Mail Archives: djgpp-workers/1996/04/05/03:52:46
On Wed, 3 Apr 1996, Marty Leisner wrote:
> for i in 1 2 3 4 5
> do
> command /c copy foo.ps lpt1:
> done
>
> you can always escape the \ whenever you need to...
The problem that triggered my thoughts is when the filenames are
generated by a program, not typed by hand. Consider this:
find -name '*.c~' -exec del {};
Find will invoke DEL with forward slashes, which DEL cannot grok.
Another example is the filenames generated by Make's file-oriented
built-in functions. Those don't know about backslashes at all, so if you
need them AND the DOS commands, you need to convert the slashes back and
forth with $(patsubst)--very ugly indeed.
> not sure why the library has to know anything about this...
That's why I suggested to include with GCC a few simple programs that
convert the slashes and call the DOS command with the same name. We
already have ECHO.EXE and REM.COM, why not include DEL.EXE, DIR.EXE,
REN.EXE and a few more?
- Raw text -