On my SunOS system, I'm trying to find all files created after 7 PM using
csh
, ls
, and awk
.
ls -l "${Source_files_Dir}"/*.zip| awk -v today="$(date "+%b %d")" '{
date=$6" "$7; time=$8; if (date == today && substr(time,1,2) >= 19)
print $9 }'|xargs -n 1 basename
This command works in ksh
but not in csh
. How can I achieve this in csh
?
Note: -newermt
option is not supported by find
on SunOS, so I tried to use the above ls
command.
Asked by Aravind
(1679 rep)
Apr 22, 2024, 01:13 PM
Last activity: Apr 25, 2024, 12:15 PM
Last activity: Apr 25, 2024, 12:15 PM