in reply to Re: system and wildcard expansion?
in thread system and wildcard expansion?
Looks as if not the CMD.EXE internal command "ECHO" is executed, but an executable called echo.exe
Indeed, thanks.
It seems that system goes off searching the path for an executable with the name "echo.exe" instead of invoking the shell built in, and happens to find one that does wildcard expansion.
I always though that if you supplied a single string argument system invoked the shell and allowed it to perform the command resolution--which would mean that it would invoke the shell built-in in preference to searching the path.
It turns out that (on windows) it only does that if it "detects shell meta chars"--which it seems does not include * or \ or ^, as I would have assumed. Only '<', '>', '|' and '%'. Not even '&' or '&&' or '||' etc. Some attempt at *nix compatibility I think.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: system and wildcard expansion?
by rovf (Priest) on Nov 12, 2010 at 09:15 UTC | |
by BrowserUk (Patriarch) on Nov 12, 2010 at 09:43 UTC | |
by rovf (Priest) on Nov 12, 2010 at 11:16 UTC | |
by BrowserUk (Patriarch) on Nov 12, 2010 at 11:40 UTC | |
by rovf (Priest) on Nov 12, 2010 at 11:49 UTC | |
|