X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=BAYES_05,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org X-SpamScore: 6 X-BigFish: VPS6(zzzz1202hzz34b0nz2dh2a8h668h839h944hd25h) X-Forefront-Antispam-Report: CIP:157.55.225.13;KIP:(null);UIP:(null);IPV:NLI;H:AMSPRD0702HT005.eurprd07.prod.outlook.com;RD:none;EFVD:NLI From: John Fairhall To: "cygwin AT cygwin DOT com" Subject: cygwin bash include scripting and error code return question Date: Sun, 25 Mar 2012 22:50:33 +0000 Message-ID: <3B35330F74CE0544934D0AAC1FBF7AFD019D01@AMSPRD0702MB120.eurprd07.prod.outlook.com> x-cr-hashedpuzzle: Bwg6 ByHc CDLh C7J+ FIU0 HxZ8 IgxT IiQj IvQs Jl+9 JxZK KNQP KrZk K1AL LDCo LFWB;1;YwB5AGcAdwBpAG4AQABjAHkAZwB3AGkAbgAuAGMAbwBtAA==;Sosha1_v1;7;{47D663A1-25DA-4AAA-B588-02FA1463F2D3};agBvAGgAbgBAAHUAdABpAGwAaQBiAGkAbABsAC4AYwBvAG0ALgBhAHUA;Sun, 25 Mar 2012 22:50:02 GMT;YwB5AGcAdwBpAG4AIABiAGEAcwBoACAAaQBuAGMAbAB1AGQAZQAgAHMAYwByAGkAcAB0AGkAbgBnACAAYQBuAGQAIABlAHIAcgBvAHIAIABjAG8AZABlACAAcgBlAHQAdQByAG4AIABxAHUAZQBzAHQAaQBvAG4A x-cr-puzzleid: {47D663A1-25DA-4AAA-B588-02FA1463F2D3} Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: utilibill.com.au Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id q2PMpAXe032458 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 propagate the shell script's return code to the external OS, but as far as I can see the windows ERRORLEVEL is always 0. Is there a way to make bash do this? John. -- 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