I've never tested file length with shell before and I'm having problems. What I'm doing is testing $filename and $filename.bak to see if there is a difference. so I use 'diff' for that and send it to an output file 'dif.txt'. Now I wanna see if the length of 'dif.txt' is zero or not. that's where i'm stuck. Here's what i got

using /csh)
diff ${filename} ${filename}.bak > dif.txt
if ( test -z dif.txt )
echo "New Backup Not Needed"
else
cp ${filename} "${filename}.bak<DATE>"
echo "New Backup Created"
endif
Also, I need assistance with proper input of todays DATE.
THANKS