Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
How to convert back slashes to forward slashes

How to convert back slashes to forward slashes

2007-08-09       - By broken connection
Reply:     1     2     3     4     5     6  

perl ??  I don' t have perl installed....so how would the exec call that
perl function???

On 8/9/07, Chun Ji <CJi@(protected)> wrote:
>
>
> If this works for you, maybe you can add an "exec" in your ant xml file.
>
> " perl -pi -e 's/\\/\\\\/g' <your prop files>"
>
>
> -c
>
>
>
> -----Original Message-----
> From: broken connection [mailto:brokenconnection@(protected)]
> Sent: Thursday, August 09, 2007 10:40 AM
> To: Ant Users List
> Subject: How to convert back slashes to forward slashes
> Importance: Low
>
>
> Hi Friends,
> I take a directory path input from the end-user and store it in a
> property,for example if its windows,it stores it as:
>
> log4j.location=C:\tomcat\logs
>
> And that messes up everything.Because \t is interpreted as tab. So, how
> can
> i change the backward slashes(windows convention) to forward slashes(unix
> convention) in the property before my build file is executed????
>
> Or, how to escape them eg "\" to "\\"
>
> I would appreciate your help.
> Thanks
> Mick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.