RE: why does command echo \\\foobar print \\foobar
"Mark Galeck (CW)" <[email protected]>
| Newsgroups | gmane.comp.gnu.make.general,gmane.comp.gnu.make.windows |
|---|---|
| Message-ID | <49DA8B716852DE4CA0B749102D55CC7A96AC5B1774@HQ-EXCH-6.corp.brocade.com> |
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:[email protected]] Sent: Sunday, February 07, 2010 11:36 AM To: [email protected]; Mark Galeck (CW) Cc: [email protected]; [email protected]; 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 ------------------