getopt(1) doesn't/can't preserve quoted args

Arthur David Olson ado at elsie.UUCP
Thu Mar 6 11:22:36 AEST 1986


> . . .They proposed altering the usage
> of getopt(1) from the current
> 	set -- `getopt ops $*`
> to
> 	eval set -- "`getopt ops "$@"`"

Do note that
	set -- whatever
is considered an error by the "sh" that comes with 4.[123]bsd.  When writing
shell scripts, you can make life easier for bsders by doing a
	set -$- whatever
which is acceptable to both bsd and System V.
--
UNIX is an AT&T Bell Laboratories trademark.
--
	UUCP: ..decvax!seismo!elsie!ado    ARPA: elsie!ado at seismo.ARPA
	DEC, VAX and Elsie are Digital Equipment and Borden trademarks



More information about the Comp.unix mailing list