I'm a beginner at shell scripting and I would like to borrow someone's help. I
wrote a little test script which I would like to run nightly. /I cannot figure
out how to erase files only if they are void/. I searched the net to no avail
and how to do this is beyond my knowledge, I'm afraid.
The script is below if anyone is truly curious
#!/bin/bash
cd /home/roy/Main/Programs/Syndication/
##############################################
OLD=gavin_old
NEW=gavin
SITE=http://www.cs.man.ac.uk/~gbrown/seminars/
FILENAME=index.html
wget -l0 -H -t0 -nd -N -np -erobots=off $SITE
mv $FILENAME $NEW
diff $OLD $NEW >/home/roy/Desktop/$NEW
mv $NEW $OLD
##############################################
OLD=mu_old
NEW=mu
SITE=http://www.manchester.ac.uk/press/
FILENAME=index.html
wget -l0 -H -t0 -nd -N -np -erobots=off $SITE
mv $FILENAME $NEW
diff $OLD $NEW >/home/roy/Desktop/$NEW
mv $NEW $OLD
|
|