MLUG: [MLUG] basic Unix pipe/exit code problem
[MLUG] basic Unix pipe/exit code problem
Email address obfuscation in effect -- please click here to turn it off.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
hey everybody,

I have a backup script that uses mysqldump | gzip in a subshell.  I
check the return code of the subshell, but mysqldump can croak without
the subshell returning a nonzero error code.

I have reduced my problem to this:

( /bin/false | gzip > /dev/null ) || echo fail 

I want it to echo "fail" because /bin/false gives a nonzero exit code.
 But it doesn't.  What am I missing?

Regards,
Mark
EMAIL:PROTECTED
-- 
You think that it is a secret, but it never has been one.
  - fortune cookie
_______________________________________________
members mailing list
EMAIL:PROTECTED
http://mlug.missouri.edu/mailman/listinfo/members