« Return to Thread: newlines in property from -D argument

Re: newlines in property from -D argument

by andrewdanger :: Rate this Message:

Reply to Author | View in Thread

yeah, this is an option, but i need it all in a script because i need to do non-ant things and i find it easier to do non-ant things in bash rather than with the <exec> task. anyway, i did find the solution, which is to escape newlines in the command output:

VAR=`cmd | sed 's/$/\\/g'` (though this actually replaces the last character of the line, it doesn't match \n, but it works)

thanks for the quick reply though.

Francis Galiegue-4 wrote:
Why don't you just put commands in a script and pass the path to that
script as an argument?

--

Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
fge@one2team.com
40 avenue Raymond Poincaré
75116 Paris

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

 « Return to Thread: newlines in property from -D argument