ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 4911] New: - exec arguments convert single quote (apos) to full quote
Date Fri, 16 Nov 2001 09:18:13 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4911>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4911

exec arguments convert single quote (apos) to full quote

           Summary: exec arguments convert single quote (apos) to full quote
           Product: Ant
           Version: 1.4.1
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core tasks
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: peterwlynch@yahoo.com


Tried various workarounds and could not get single quotes to output as part of 
an argument for the exec task.

I wanted to use awk and no matter what I  did, the ' came out as "

Examples:
<exec os="SunOS" executable="awk" outputproperty="host.address">
<arg line="'NR == 2 { print $NF }'" />
</exec>

<exec os="SunOS" executable="nslookup" outputproperty="host.address">
<arg value="${host.name}" />
<arg line="| awk 'NR == 2 { print $NF }'" />
</exec>

awk commands require single quotes. How can I do this other than write a 
wrapper script.

The above always outputs awk "NR == 2 { print $NF }" which the shell does not 
like.

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message