watergrinder
MIS
Hi is there a quick way to compare dates? I wanted to delete all files less than a day-before-yesterday
Any quick suggestions?
Any quick suggestions?
Code:
ls -l | awk ' NR>1 {print $6, $7, $9}' | while read Month Day FileName
do
if [ "$Month" = $MON -o "$Day" -le $DeleteDate ]; then
rm $FileName
fi
done