Re: exit-on-error (set -e) option and command after "if" not found

2011-06-22 Thread Eric Blake
On 06/22/2011 06:51 AM, Dmitry Bolshakov wrote: > Hi > > set -e > if nosuchcommand | grep blabla > then > echo ERROR: blabla was found > exit 1 > fi > echo it was unexpected for me, I thougt this line should not be echoed Not a bug; this last echo is supposed to happen. The documentation for

exit-on-error (set -e) option and command after "if" not found

2011-06-22 Thread Dmitry Bolshakov
Hi set -e if nosuchcommand | grep blabla then echo ERROR: blabla was found exit 1 fi echo it was unexpected for me, I thougt this line should not be echoed (bash 4.1.10(4)-release) -- With best regards Dmitry Bolshakov