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=16692>.
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=16692

ant exec egrep and alike fail with cygwin

           Summary: ant exec egrep and alike fail with cygwin
           Product: Ant
           Version: 1.1
          Platform: PC
               URL: http://ant.apache.org/manual/CoreTasks/exec.html
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Minor
          Priority: Other
         Component: Documentation
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


When I do that I get the error 2: file not found:
I understand that even though I call it from the cygwin shell, ant goes to the
windows level and tries to call egrep.
It turns out that in cygwin, egrep is a symlink on the grep binary and upon
invocation only it figures out by arg 0 how to behave. I assume this is the 
problem.

It would be great to mention that despite being cygwin user, one cannot relay on
cygwin's egrep and its other commands/shell, but 
i) but that ant doesn't see cygwin's shell emulation layer but goes directly to
windows (causes problems like failing output redirection ">" see
http://issues.apache.org/bugzilla/show_bug.cgi?id=13652 or other
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13678 etc. )
ii) and for this very example of egrep, one should take another binary - e.g.
http://unxutils.sourceforge.net/ as per http://regex.info/egrep.html and it
works fine.

I suggest to mention this in the above URL or maybe under
http://ant.apache.org/faq.html since I guess a lot of ant-users are cygwin
users. I am happy to provide a patch for the faq.xml if desired.

Reply via email to