Path: utzoo!utgpu!watserv1!watmath!iuvax!mailrus!usenet.ins.cwru.edu!cwns1.INS.CWRU.Edu!chet From: chet@cwns1.INS.CWRU.Edu (Chet Ramey) Newsgroups: comp.sys.hp Subject: Re: Bug in HP's /bin/sh? Message-ID: <1990Feb8.224246.20180@usenet.ins.cwru.edu> Date: 8 Feb 90 22:42:46 GMT References: Sender: news@usenet.ins.cwru.edu Reply-To: chet@po.CWRU.Edu Organization: Information Network Services, Case Western Reserve Lines: 23 In article , montnaro@spyder.crd.ge.com (Skip Montanaro) writes: > Apparently there is only a single argument vector shared by functions under > HP's version of /bin/sh, so calling a function from within another function > ruins the argument vector to the first. Is this fixed in 7.0? The workaround > is to save the argument vector in a separate variable: This is true for all versions of /bin/sh descended from the System V.2 sh, including Ultrix /bin/sh5, SunOS 3.x sh, and a few others. There is a single level of argument saving in the System V.3 sh, from which the SunOS 4.x sh (and, I would assume, the Stellix 2.0 sh) is derived. A single level of saving is sufficient, since recursive functions are disallowed. (Obligatory plug :-) Bash (the GNU Bourne-Again SHell) allows recursive functions and correctly saves the dollar variables. Look for version 1.05 soon. Chet Ramey "Can't you pay a grad student to Network Services Group read the manual for you?" Case Western Reserve University -- Bill Wisner, chet@ins.CWRU.Edu to Peter Honeyman