[Top][All Lists]

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

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

From: Duane Campbell
Subject: RE: why does command echo \\\foobar print \\foobar
Date: Sun, 7 Feb 2010 11:35:57 -0800

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


-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of Paul Smith
Sent: Sunday, February 07, 2010 7:57 AM
To: Mark Galeck (CW)
Cc: address@hidden; address@hidden
Subject: RE: why does command echo \\\foobar print \\foobar

On Sat, 2010-02-06 at 20:56 -0800, Mark Galeck (CW) wrote:
> But Paul, one more thing, where does it say in the manual, that it
> should be \foobar (one slash).

It doesn't say anywhere in the manual, because this has nothing to do
with GNU make.  Make does not actually RUN the commands that you write,
it passes the commands to the shell and lets the shell run them.  So,
with only the exceptions that ARE described in the manual for special
characters that make cares about, make doesn't do anything to the
commands including reducing backslashes.

Certainly I'm not going to reproduce the documentation for the shell
inside the GNU make manual: that documentation already exists elsewhere.

 Paul D. Smith <address@hidden>          Find some GNU make tips at:            
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist

Make-w32 mailing list
This email message is for the sole use of the intended recipient(s) and may 
confidential information.  Any unauthorized review, use, disclosure or 
is prohibited.  If you are not the intended recipient, please contact the 
sender by
reply email and destroy all copies of the original message.

reply via email to

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