[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: why does command echo \\\foobar print \\foobar

From: Mark Galeck (CW)
Subject: RE: why does command echo \\\foobar print \\foobar
Date: Sun, 7 Feb 2010 12:44:09 -0800

>But you already found a way:


          echo \\foobar

>(and rename echo.exe to something else, or remove it from PATH).

No, I can't "rename echo.exe or remove it" - I have to support developers where 
I don't have control whether or not they are using Cygwin.  I can't tell them 
to remove echo :)

>The way it works with the Windows shell and Windows echo will not

wait, we already established, that this has nothing to do with shell or echo - 
on Windows, GNU make is currently stripping one of 3 backslashes in a command 
like this:

        perl \\\foobar

and, I think we have established that this behavior is undocumented ( I think 
Paul is saying it is a bug, and you are saying you are not sure).  

Right now, my "solution" is to do 
        perl \\\\foobar

in order to pass \\foobar to Perl.  Somehow I feel it is safer than 3, but heck 
I have no clue really.  

This looks funny, and if my boss during a review asks "why do you need 4 
backslashes" I will properly have to say "I don't know for sure, but it seems 
to work" and I can tell you that he will not be satisfied with this answer, 
because it might start not working one sunny day, when a new version of GNU 
make is relased.  

reply via email to

[Prev in Thread] Current Thread [Next in Thread]