Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!mcsun!sunic!nuug!ifi!is.uu.no!ra From: ra@is.uu.no (Robert Andersson) Newsgroups: gnu.bash.bug Subject: ${parameter-word} substitution bug in 1.04 Message-ID: <1989Dec28.182834.7529@is.uu.no> Date: 28 Dec 89 18:28:34 GMT Organization: International Systems A/S, Oslo, Norway. Lines: 18 This is on an NCR Tower 32/400 running SYSVr2. Bash does not seem to handle ${parameter-word} substitution correctly when parameter is one of the $1 to $9 positional parameters. The following typescript describes the problem in detail: Script started [typescript] at Thu Dec 28 18:16:34 1989 ra ~ $ cat bashbug a=${1-default} echo $a ra ~ $ bash bashbug xxx default ra ~ $ sh bashbug xxx xxx ra ~ $ Script ended [typescript] at Thu Dec 28 18:17:06 1989 -- Robert Andersson, International Systems A/S, Oslo, Norway. Internet: ra@is.uu.no UUCP: ...!{uunet,mcvax,ifi}!is.uu.no!ra