"set" question for Bourne shell scripts
Gary M. Samuelson
garys at bunker.UUCP
Fri Feb 15 01:13:48 AEST 1985
> The Bourne shell allows you to set the positional parameters with:
> set a b c d e
> $# yields 5
> regardless of the parameters given to the shell script on the command line.
>
> Now, my question is, how do you remove all parameters, i.e. set $# to 0?
Try: set x; shift
'set x' creates a list of one parameter, x, then 'shift' deletes
that one parameter.
Gary Samuelson
More information about the Comp.unix
mailing list