[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
failed grep should cause subshell to exit
From: |
David Lehmann |
Subject: |
failed grep should cause subshell to exit |
Date: |
Sun, 18 Aug 2013 17:00:22 -0400 |
### should never see done****
** **
% uname -a
Linux xxxxx 2.6.32-279.2.1.el6.x86_64 #1 SMP Thu Jul 5 21:08:58 EDT 2012
x86_64 x86_64 x86_64 GNU/Linux
% bash --version
GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)
(****
set -ex****
** **
echo hello >x****
grep hello x****
! grep hello x****
echo $?****
### should not see "done" because set -e
echo done****
)
- failed grep should cause subshell to exit,
David Lehmann <=