home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.unix.questions:10015 comp.unix.shell:3467 comp.sys.hp:9216
- Path: sparky!uunet!mcsun!Germany.EU.net!unido!horga!teddy!germany!open!open.de!ruhr.de!reswi!knipp!elmar
- From: elmar@knipp.en.open.de (Elmar Knipp)
- Newsgroups: comp.unix.questions,comp.unix.shell,comp.sys.hp
- Subject: Re: Strange side effects caused by calling sh functions with args.
- Message-ID: <1992Aug10.201547.946@knipp.en.open.de>
- Date: 10 Aug 92 20:15:47 GMT
- References: <smr.713169919@hitkw14>
- Distribution: comp
- Organization: Private/FRG
- Lines: 28
-
- smr@iti.org (Stephen Riehm) writes:
-
- >I am maintaining a rather large shell script, with many functions, and
- >it appears that if a function is called with some arguments, then the
- >arguments to that function become the arguments to the entire
- >script. Is this the normal way that this should work? I have checked
- >the following script, on the sun I get what I expect, but on the HP I
- >don't. Which shell is right?? ( My reference manual only states:
- >functions in shell scripts have access to $# $* and $1-9, it doesn't
- >specify any side effects. The HP manpage doesn't even mention sh
- >functions )
-
- I had the same problem with "sh" on a HP9000/720 with HP-UX 8.07.
- Use the korneshell "ksh" and it works ok.
-
- Elmar
-
- --------------------------------+-------------------------------------
- Elmar Knipp | Voice: + 49 231 975015-0
- Knipp Satz und Bild digital | Fax 3: + 49 231 975015-80
- Technologiepark | Modem: + 49 231 975015-82
- Martin-Schmeisser-Weg 9 | ISDN-Server: + 49 231 975015-831
- 4600 Dortmund 50 | E-Mail: elmar@knipp.en.open.de
- Germany |
- --------------------------------+-------------------------------------
-