-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

How can i use an if in a bash script so that it will only run commands if the 
specified file is empty? 

Basically, ive set up a cache system by which the output of ifconfig is 
stored in /var/cache/IP/1

Then, every minute my script is run. It first puts the output of ifconfig in 
/var/cache/IP/2 and diff's it with 1 outputing that to a file 'diff'. I then 
want to run a series of commands if the file diff is not empty.

What im trying to do is get an email sent to me every time the IP changes on 
a specific machine, so i always have a record of it for logging in via ssh. 
The specific connection is ppp0 which auto redials on disconnect. If there is 
an easier way of doing this please share with me.

Thanks

Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8fWUSXCpWOla2mCcRAmyuAJ0dNeH725n8jc0UhaeIYgdxlerG3wCfQwtM
mEDR987gtUilwovjGKbV3b8=
=IODe
-----END PGP SIGNATURE-----

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to