Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!iuvax!sahayman From: sahayman@iuvax.cs.indiana.edu (Steve Hayman) Newsgroups: comp.sys.apollo Subject: SR10 /bin/sh bug, error msg characters have high bit set Message-ID: <15671@iuvax.cs.indiana.edu> Date: 9 Dec 88 02:49:30 GMT References: <15669@iuvax.cs.indiana.edu> Reply-To: sahayman@iuvax.cs.indiana.edu (Steve Hayman) Organization: Computer Science Department, Indiana University Lines: 22 Has anybody else seen this? The Bourne shell ${var-word} syntax is supposed to echo "word" and exit if var is unset. That happens OK, except that the word is echoed with the high bits of each character set. ("echo $var" and various other incantations are OK though, it's only the ${var-"word"} that is broken.) This is using SR10 in a bsd4.3 environment. Run this script with no argument and the error message is printed with the high bits set, which happens to result in a variety of alternate characters. The bug does not happen if "Error" is unquoted, but often you want a multi-word error message. #!/bin/sh arg=${1?"Error"} ..Steve -- Steve Hayman Workstation Manager Computer Science Department Indiana U. sahayman@iuvax.cs.indiana.edu