Mail Archives: djgpp/2002/05/25/04:30:38
> From: CBFalconer <cbfalconer AT yahoo DOT com>
> Newsgroups: comp.os.msdos.djgpp
> Date: Fri, 24 May 2002 19:00:56 GMT
>
> Which means that "rm @foo" cannot mean to remove the file "@foo",
> because if it exists it is an extended command line, and if it
> doesn't it becomes an argument. So, at least for rm, that usage
> makes no sense.
You assume that all arguments to `rm' are file names. That is not
true. While today none of the known non-file arguments can begin with
a @, that may change as rm is developed and maintained.
> BTW a thought occurs to me - if the @ mechanism is to effectively
> extend command lines, what is the effect of multiple @ in a single
> command, e.g. "rm @foo @bar"?
They are all expanded one by one, using the same code.
In other words, the startup code loops through all the arguments it
got from DOS, and processes each one with the code that expands
wildcards, reads response files, etc.
For details, see the file src/libc/crt0/c1args.c from djlsr203.zip.
- Raw text -