Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/17/84; site elsie.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!zehntel!hplabs!hao!seismo!umcp-cs!cvl!elsie!ado From: ado@elsie.UUCP (Arthur David Olson) Newsgroups: net.unix Subject: Re: "set" question for Bourne shell scripts Message-ID: <5057@elsie.UUCP> Date: Fri, 15-Feb-85 22:21:30 EST Article-I.D.: elsie.5057 Posted: Fri Feb 15 22:21:30 1985 Date-Received: Tue, 19-Feb-85 06:45:41 EST References: <661@turtlevax.UUCP> <103@mot.UUCP> Organization: NIH-LEC, Bethesda, MD Lines: 15 > > Now, my question is, how do you remove all parameters, i.e. set $# to 0? > > try > shift $# Alas, this fails (at least on our 4.1bsd system) if $# was zero to begin with. Instead try set x ; shift or, to ensure that flags are preserved, try set -$- x ; shift -- Shell Oil surely has some legal claim on "Shell." -- UUCP: ..decvax!seismo!elsie!ado ARPA: elsie!ado@seismo.ARPA DEC, VAX and Elsie are Digital Equipment and Borden trademarks