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

"Mark Galeck (CW)" <[email protected]>
Newsgroups gmane.comp.gnu.make.windows
Message-ID <49DA8B716852DE4CA0B749102D55CC7A96AC5B176D@HQ-EXCH-6.corp.brocade.com>
>This works for me: I see

    echo \\\foobar
    \\\foobar


OUCH!  I was using Cygwin echo, unknown to me (echo is not a executable in Windows, so the windows shell found the Cygwin echo, later in the path, and did not do the built in Windows echo).  

So now I see this:

Cygwin echo from Cygwin shell:

$echo \\\foobar
\foobar

From windows shell:

C:\Temp>c:\tools\cygwin\bin\echo \\\foobar
\\\foobar


And from within GNU make

SHELL=cmd.exe 

foobar:
		echo \\\foobar

C:\Temp>make foobar
echo \\\foobar
\\foobar


I can kind of understand the first two behaviours:  the first, Cygwin echo within a Unix-like shell, tries to behave like Unix.  Second, within Windows, tries to be compatible with windows echo.  

But third, I still don't understand.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.