Mail Archives: djgpp/1997/10/12/21:24:42
At 03:30 10/12/1997 -0500, Chris Frolik wrote:
>I tried compiling/running the following program:
>[snipped]
>Then I tried typing the following command line:
>
> test *.c
>
>And I didn't get the output I expected -- It printed out all of the
>files in the directory with the extension ".C". I can see how this can
>be useful -- but what if I want to pass "*.c" literally as the first
>argument? (which I want to be able to do in a program I wrote). It
>seems to me this is impossible to do. Is this because of DJGPP, or the
>way DOS passes the command line?
It's DJGPP. The reason for this is to make the behavior more Unix-like. In
Unix, the shell does this expansion. Read FAQ section 16.1 for more info,
and 16.2 for how to get around it. (The easiest way is to quote the args.)
Nate Eldredge
eldredge AT ap DOT net
- Raw text -