Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site bunker.UUCP Path: utzoo!utcs!lsuc!pesnta!qumix!ittvax!bunker!garys From: garys@bunker.UUCP (Gary M. Samuelson) Newsgroups: net.unix Subject: Re: "set" question for Bourne shell scripts Message-ID: <727@bunker.UUCP> Date: Thu, 14-Feb-85 10:13:48 EST Article-I.D.: bunker.727 Posted: Thu Feb 14 10:13:48 1985 Date-Received: Fri, 15-Feb-85 09:49:29 EST References: <661@turtlevax.UUCP> Distribution: net Organization: Bunker Ramo, Trumbull Ct Lines: 13 > 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