[comp.sys.apollo] SR10 /bin/sh bug, error msg characters have high bit set

sahayman@iuvax.cs.indiana.edu (Steve Hayman) (12/09/88)

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