ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Christiansen" <Nathan_Christian...@tni.com>
Subject RE: [solution] Need help using exec to do "ls -rt1 | tail -1"
Date Mon, 07 Apr 2003 22:22:57 GMT
I did it on my Red Hat system using DD's code with no problems.

-- Nathan Christiansen
   Tahitian Noni International
   http://www.tahitiannoni.com


-----Original Message-----
From: Matt Reason [mailto:matt.reason@movielink.com]
Sent: Monday, April 07, 2003 4:13 PM
To: Ant Users List
Subject: RE: [solution] Need help using exec to do "ls -rt1 | tail -1"




You would think that'd work, but it doesn't.

Trust me - I've done them both.

Ant needs to pass a string with quotes in it to the sh executable.

Matt

-----Original Message-----
From: Dominique Devienne [mailto:DDevienne@lgc.com] 
Sent: Monday, April 07, 2003 12:31 PM
To: 'Ant Users List'
Subject: RE: [solution] Need help using exec to do "ls -rt1 | tail -1"


This should also work, and the quoting's done by Ant:

<exec dir="${sourcedir}" executable="sh" ...>
  <arg value="-c"/>
  <arg value="ls -rt1 | tail -1"/>
</exec>

It's a bit easier on the eyes IMHO. --DD


Matt

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message