[comp.unix.questions] Unseting positional parmaters from inside a program

maart@cs.vu.nl (Maarten Litmaath) (01/23/90)

In article <481d9fde.14a1f@force.UUCP>,
	covertr@force.UUCP (Richard E. Covert) writes:
\...
\args=`./setargs "ab:" "avar:bvar" "$@" `
\...
\_______________ screen dump of test_setargs __________________
\args is avar=1;bvar='bs string';set -- 
\...

The problem:

	set --

doesn't unset the arguments (set $# to 0), it does nothing, which is a bug
(dubious feature) IMHO.  Solution:

	set x <the remaining arguments, if any>
	shift

Followups to comp.unix.questions.
-- 
  What do the following have in common:  access(2), SysV echo, O_NONDELAY?  |
  Maarten Litmaath @ VU Amsterdam:  maart@cs.vu.nl,  uunet!mcsun!botter!maart