Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!usc!ucsd!ucbvax!hplabs!hpfcso!hpfcdc!rpt From: rpt@hpfcdc.HP.COM (Rich Testardi) Newsgroups: comp.sys.hp Subject: Re: Bug in HP's /bin/sh? Message-ID: <5570378@hpfcdc.HP.COM> Date: 9 Feb 90 21:58:26 GMT References: Organization: HP Ft. Collins, Co. Lines: 21 You might try using /bin/ksh -- it gives each function its own argument list. Ksh also allows functions to have *local* variables thru the use of the "typeset" built-in command. If you are stuck using /bin/sh, you might adopt the convention of always assigning the function's parameters to uniquely named shell variables -- I typically prefix all variable names with the name of the function (or an abbreviation) in which they are declared. For example: Foo() { Foo_firstArg=$1 Foo_secondArg=$2 # possibly call other functions # use Foo_firstArg and Foo_secondArg } -- Rich Testardi