make-w32
[Top][All Lists]
Advanced

[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 13:30:14 -0800

I see.  OK, thank you, but right now, I actually settled on using perl for what 
I needed this for.  So it does not matter, I just need to make sure perl gets 
precisely 2 backslashes:  "\\foobar" (I suppose I could process this in perl if 
it gets a different numbers, it's just that, until I see documented or 
reasonably explained behavior, I don't know what I will be getting in Perl 5 
years from now, with the new version of GNU make).  



-----Original Message-----
From: Duane Campbell [mailto:address@hidden 
Sent: Sunday, February 07, 2010 11:36 AM
To: address@hidden; Mark Galeck (CW)
Cc: address@hidden; address@hidden; Duane Campbell
Subject: RE: why does command echo \\\foobar print \\foobar

If you want to make sure CMD's built-in "echo" is colled, not some "echo.exe", 
then put a dot on the command.

    echo foo
will find a .exe named echo if it can

    echo. foo
will never find a .exe, so fallsback to the cmd.exe built-in

The same "append a dot" trick works for all CMD.EXE built-in functions: mkdir, 
rmdir, dir, type, etc
------------------




reply via email to

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