Home Messages Index
[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index

Need Help with a Shell Script

  • To: linux-users@lists.man.ac.uk
  • Subject: Need Help with a Shell Script
  • From: Roy Schestowitz <r@schestowitz.com>
  • Date: Sun, 19 Jun 2005 13:43:46 +0100
  • Delivery-date: Sun, 19 Jun 2005 13:43:46 +0100
  • Envelope-to: r@schestowitz.com
  • User-agent: Internet Messaging Program (IMP) H3 (4.0)
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

[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index