I need to return records where there is an access date older than 60 days along with Perforce UserName, Email & Last Accessed Date in Perforce. I am aware of the perforce command to get the all user list with "%User% %Email% %Access%" in combination with p4 users. However, I'm looking for some script that can be set in a cron job to daily monitor and send the alert through email.
The command that i am using to get all user list is
p4 -ztag -F "%User% %Email% %Access%" users | awk '{$3=strftime("%Y/%m/%d %H:%M:%S",$3)} {print}' | sort -k 2,3 | sed 's/[ \t]/,/g'
Any help would be much appreciated.