[plug] Nightly Shutdown / Backup Scripts
Brian Tombleson
brian at paradigmit.com.au
Wed Feb 6 10:45:57 WST 2002
From: "Ben Jensz" <jensz at wn.com.au>
> To add to what Peter said, if I ran:
>
> /etc/backupscript.sh && shutdown -r now
>
> That'd shutdown the computer after the first program/script has finished.
> There is probably a cleaner way to do it (someone feel free to step in
> anytime here :P), but I'm no programmer :P
Err .. only if the backupscipt.sh returned a logical positive (not null, not
zero) (??)
I believe (but not positive about) bash efficiently handling logical
operators, so if the first argument returned a false, there is no point in
evaluating the second argument since the overall result is already
determined.
I don't remember what the default return value is, but if the above fails,
this will be one thing to check.
ICBW
- Brian.
More information about the plug
mailing list