On Mon, 21 Feb 2000, Lenz Grimmer wrote:
Hi,
On Mon, 21 Feb 2000, Jon Pennington wrote:
Okay, I've cleaned up my script quite a bit since this posting. The part that still eludes me is the usage of the || operator. Remember, I've never written a script in my life ;)
Well, the || operator is very smart. It's an OR operator that can be used for checking, if an operation failes or not.
<operation1> || <operation2>
I understand what it does, I just don't know how to use it ;). Probably something like: gzip $IRM_DUMP || exit 1 But then what do I do (in a sh script) with the bad exit status? If I understand correctly, my script would simply die, and I would have no way of knowing how or why. How do I trap that bad exit to send an alternate mail message with a description of why it failed? -- -=|JP|=- Jon Pennington | Atipa Linux Solutions -o) jpennington@atipa.com | Kansas City, MO /\\ 816-241-2641 x107 | http://www.atipa.com _\_V -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/