www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1996/04/05/03:52:46

Date: Fri, 5 Apr 1996 10:45:56 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Marty Leisner <leisner AT sdsp DOT mc DOT xerox DOT com>
Cc: DJ Delorie <dj AT delorie DOT com>, djgpp-workers AT delorie DOT com
Subject: Re: Style of slashes and `system'
In-Reply-To: <9604032212.AA18047@gnu.mc.xerox.com>
Message-Id: <Pine.SUN.3.91.960405103552.20066H-100000@is>
Mime-Version: 1.0

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019