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.sh %ERRORLEVEL% %LOGFILE% I always get a zero ERRORLEVEL. When I try this: bash -o pipefail -c "mainScript.sh 2>&1 | tee %LOGFILE%" it errors with bash: mainScript.sh: command not found J. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple