A convention for -file
Moderator, John Quarterman
std-unix at ut-sally.UUCP
Fri Nov 7 23:57:13 AEST 1986
From: weemba at brahms.berkeley.edu (Matthew P Wiener)
Date: Fri, 7 Nov 86 03:02:53 PST
Organization: University of California, Berkeley
In article <6239 at ut-sally.UUCP> seismo!mcvax!guido (Guido van Rossum) writes:
>What nobody seems to have noticed about the proposed "solution" to file
>names starting with "-" by prefixing another "-", is that it would break
>shell file name expansion.
Of course, but it is trivial (if ugly) to get around, using backquotes.
The reason I am interested is because it came up years ago. I overloaded
the command line with arguments so that my program could run on our high
speed batch only machine. And there was one die hard from our batch machine
who liked punctuation marks as his first character. (The other machine had
a completely different argument convention, so there were different taboo
names.) And yes, I had strings and post-filename flags in the command line
to boot.
If getopt is to be the standard, a -+ flag to turn flags back on should be
added. Except for -- -+, meaning file -+. (But then, somebody is going to
break on that by having a null name show up in between a -- and -+ from an
uncareful $variable expansion. Weee!)
ucbvax!brahms!weemba Matthew P Wiener/UCB Math Dept/Berkeley CA 94720
Volume-Number: Volume 8, Number 48
More information about the Mod.std.unix
mailing list