Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 70087 invoked from network); 5 Aug 2009 18:36:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 Aug 2009 18:36:27 -0000 Received: (qmail 70963 invoked by uid 500); 5 Aug 2009 18:36:33 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 70882 invoked by uid 500); 5 Aug 2009 18:36:33 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 70872 invoked by uid 99); 5 Aug 2009 18:36:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Aug 2009 18:36:33 +0000 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=FORGED_YAHOO_RCVD,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Aug 2009 18:36:24 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1MYlLH-000126-5E for user@ant.apache.org; Wed, 05 Aug 2009 11:36:03 -0700 Message-ID: <24833938.post@talk.nabble.com> Date: Wed, 5 Aug 2009 11:36:03 -0700 (PDT) From: Eric Fetzer To: user@ant.apache.org Subject: Re: equals condition issue In-Reply-To: <1f97de60802060410r6f047b1bs65f156fa0eb0a207@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: elstonkers@yahoo.com References: <1f97de60802060410r6f047b1bs65f156fa0eb0a207@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org I believe this to be the same issue as I am having with sshexec putting a linefeed, cr, or both. If this antuser would have put an echo on his property like so: He would have seen that there's a cr stuck in there. It does the same with output when you put it in a text file. I had it do that, then opened the text file in notepad and saw the funky character on the end of the output. The resulting property ends up being "uncomparable" because of the special character on the end. zw wrote: > > Hi > > monitor.sh is a shell script on a remote host that returns a 1 or other > non-zero number > I'm having problems trying to get property "confused" to be checked and > used > within the if-then-else condition. > But for unknown reason, it refuses to enter into the then section of > script > even though the property is matched to 1. > Am willing to hear feedback/tips from the gurus here. > Any help/tips is appreciated. > > > Output > ----------- > _check: > [sshexec] Connecting to lin2:22 > [sshexec] 1 <-------------- returned by > monitor.sh > [echo] return_code 1 > [echo] end of target > _recheck: > [echo] confused 1 > [echo] > BUILD SUCCESSFUL > Total time: 1 second > > > > > > Below is my partial script. > > > > > > > username="${name}" > > password="${pass}" > > command=". ./.profile; > > cd ${lg_dir}; > > ./monitor.sh ; > > " > > failonerror="false" > > output="output.txt" > > outputproperty="return_code" > > timeout="0" > > trust="true"/> > > > > > > > > > > > > > > > > confused ${confused} > > > > > > > > Inside > > > > > > > antfile="main.xml" > > target="complete"> > > > > > > > > antfile="_start.xml" <---------- suppose to call the top > target; unknown reason why it refuses to execute even not 1 > target="_check" > return="return_code"> > > > > > > > > > -- View this message in context: http://www.nabble.com/equals-condition-issue-tp15311286p24833938.html Sent from the Ant - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org