Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!cs.utexas.edu!uunet!mcsun!hp4nl!star.cs.vu.nl!condict From: condict@cs.vu.nl (Michael Condict) Newsgroups: comp.os.minix Subject: Bugs in Minix Shell Keywords: Minix 1.3 Message-ID: <3881@condict.cs.vu.nl> Date: 27 Oct 89 15:23:20 GMT Organization: V.U. Informatica, Amsterdam, the Netherlands Lines: 29 In 5 or 10 minutes of trying out a friend's Minix (version 1.3), I discovered several bugs in the shell (sh). Have these been encountered before, and does anyone have fixes? (1) "$@" is expanded to the single word "$1 $2 . . . $n", when it should be expanded to n quoted words: "$1" "$2" . . . "$n". (2) x=`date` produces the error message "Oct: not found" (this bug is repeatable only during the month of October :-). This is because the shell breaks the output of date into separate words. It should treat the output of the command as a single word, making the assignment command equivalent to: x="`date`". (The latter is handled correctly by Minix). Actually I prefer the Minix sh behaviour, because it is more useful to differentiate between "`command`" and `command`, but it differs from every major /bin/sh in use today. (3) "set - a b" doesn't work, at least not when typed to an interactive shell. It produces no error message, but afterward, echo "$1" produces un- printable garbage. (For those who don't know, "set - a b" is supposed to set the $1 to "a" and $2 to "b" in the shell that executes it. This is useful when followed by ". file". It allows arguments to be passed to the file, even though the "." command won't accept them.) Any of the above could cause major hassles when trying to run shell scripts from other versions of Unix on Minix. -- Michael Condict condict@cs.vu.nl Vrije University Amsterdam