Thanks to all of you for taking interest in my query.
I myself is in favor of solution which can be platform independent but was 
clueless on how to achieve this in ANT, the shell command which I wanted to 
incorporate on my ANT script is only a part of lengthy command in actual I 
wanted to write the content of a folder in a file with “/*” suffix and “jobs/” 
as prefix to each entry, so say a directory contains following folders
Abc
Def
Ghi
Jkl
Above contents in my txt file should look like this:
Jobs/Abc/*
Jobs/Def/*
Jobs/Ghi/*
Jobs/Jkl/*
And so on
So to achieve the above output I thought shell script is the best and easiest 
way to achieve this and which I can make a call through my ANT script, but if I 
get the solution in pure ant form then it will be great. Any thoughts?







-----Original Message-----
From: David Weintraub <qazw...@gmail.com>
To: Ant Users List <user@ant.apache.org>
Sent: Thu, Nov 25, 2010 1:46 am
Subject: Re: Using shell command in ANT script


On Wed, Nov 24, 2010 at 12:33 PM, Ludwig, Michael
michael.lud...@delphi-mb.de> wrote:
 It's <fixcrlf>, not <fixcrnl>.

 And you could also use <pathconvert>:
Thanks for that tip of <pathconvert>. You can also use the
flattenmapper/> to remove directory names if you so choose:
        <fileset dir="../../../jobs" id="dir">
           <include name="*"/>
       </fileset>
       <pathconvert refid="dir"
           property="dir.prop"
           pathsep="${line.separator}">
           <flattenmapper/>
       </pathconvert>
       <echo message="${dir.prop}" file="foo"/>
That should be able to replace the <exec> task.
-- 
avid Weintraub
azw...@gmail.com
---------------------------------------------------------------------
o unsubscribe, e-mail: user-unsubscr...@ant.apache.org
or additional commands, e-mail: user-h...@ant.apache.org


Reply via email to