Re: cygwin bash include scripting and error code return question

2012-03-26 Thread Corinna Vinschen
On Mar 26 05:24, John Fairhall wrote: > The pipe is definitely the problem. > > If I have this: > > bash mainScript.sh 2>&1 > bash mailBuild.sh %ERRORLEVEL% %LOGFILE% > > When I gimmick mainScript to exit with any non-zero value I get an ERRORLEVEL > of 255. > > However, when I do this: > > b

RE: cygwin bash include scripting and error code return question

2012-03-25 Thread John Fairhall
The pipe is definitely the problem. If I have this: bash mainScript.sh 2>&1 bash mailBuild.sh %ERRORLEVEL% %LOGFILE% When I gimmick mainScript to exit with any non-zero value I get an ERRORLEVEL of 255. However, when I do this: bash -o pipefail mainScript.sh 2>&1 | tee $LOGFILE bash mailBuild

Re: cygwin bash include scripting and error code return question

2012-03-25 Thread Linda Walsh
John Fairhall wrote: Hi, I have a cygwin bash script running on 32 bit XP. I have a windows BAT script calling bash, like so: --- bash mainScript.sh 2>&1 | tee %LOGFILE% bash mailBuild.sh %ERRORLEVEL% %LOGFILE% --- What I was hoping was that bash would propag