Xref: utzoo comp.unix.ultrix:4724 comp.unix.questions:25885 Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uunet!aplcen!haven!umbc3!math9.math.umbc.edu!rouben From: rouben@math9.math.umbc.edu Newsgroups: comp.unix.ultrix,comp.unix.questions Subject: Bug report for /bin/sh5 under ultrix 4.0 Message-ID: <4052@umbc3.UMBC.EDU> Date: 1 Oct 90 04:18:12 GMT Sender: newspost@umbc3.UMBC.EDU Reply-To: rouben@math9.math.umbc.edu () Organization: Mathematics Department University of Maryland, Baltimore County Lines: 35 The following short script produces incorrect results under ultrix 4.0: --------- Begin Script ----------------------- #!/bin/sh5 dummy () { echo This message from dummy } set Hello World echo $1 # These lines echo $2 # will echo "Hello World" dummy echo $1 # These lines echo $2 # will echo blanks!! They shouldn't. ---------- End Script --------------------- Notes: /bin/sh5 is ultrix's counterpart of /bin/sh in System V. Probably its most significant advantage from a programmer's point of view is its function defining capability. In the script above the function "dummy" is defined to echo a string. An unintended side-effect of the execution of the function dummy is that it clears the shell variable $1 and $2. This shell script executes correctly on Stardent 3000 which is a hybrid BSD/SysV machine. -- Rouben Rostamian Telephone: (301) 455-2458 Department of Mathematics and Statistics e-mail: University of Maryland Baltimore County rostamian@umbc.bitnet Baltimore, MD 21228, U.S.A. rostamian@umbc3.umbc.edu