Mail Archives: djgpp/1994/10/05/04:49:52
> C:\TEST> dummy \*
> \ai <- This One !!!
> C:\TEST> dummy \*a
> \*a
>
> I tried other C compilers (including EMX/GCC). They returned:
>
> C:\TEXT> dummy \*
> \*
Can't help you with explaining the EMX output (I don't know how
it works) but everything else makes good sense. I presume there
is a file or directory called c:/ai, right? Under DJGPP, command
line globbing doesn't treat backslash `\\' as escape (quote)
character, because somebody might use it as directory separator,
e.g., ``fgrep some-string c:\test\myfile''. Therefore, the `*' gets
expanded. You don't have in c:/ files which end with `a', so
``\*a'' fails to expand and is delivered to your program verbatim.
To quote backslash under DJGPP, use "", like this:
C:\TEST> dummy "\*"
which should print `\*', or dummy "*" which should print `*', as
does \* under Unix.
Alternatively, you could suppress globbing by adding ``noglob'' to your
GO32 environment variable, but that would be too much of a lossage.
Eli Zaretskii
- Raw text -