Subject: Re: correct shell behaviour?
To: NetBSD Userlevel Technical Discussion List <tech-userlevel@NetBSD.ORG>
From: David Laight <>
List: tech-userlevel
Date: 08/22/2002 00:06:37
On Tue, Aug 20, 2002 at 11:06:05PM +0200, Klaus Heinz wrote:
> David Laight wrote:
> > It is such a gorgeous summer's day here that I've been writing
> > a script to test some of these obscure shell 'features'.
> Could this script, or parts of it, be included under
> src/regress/bin/sh/ via a PR?

Yes - when I've added some more perverted tests.
> If the correct results were recorded in this directory, we might be able
> to avoid this 'broken/fixed/broken' scenario in the future.

I've now 'fixed' all the bugs I've found.  Making the shell
posix compiant has probably broken something important though!
(The biggest change is that some of the builting are 'special'
and cannot be overridden - eg by shell functions.)

If anyone is feeling brave I've put my current sh sources
onto the web ( then netbsd/sh).
All of 'sh' and 'sh/bltin' are there, you also need 'printf'
(because I've make it a builtin).

The 'diffs' file is the output of 'cvs diff -u .' is my test file - try running it on a few shells
(they need to support $(..) and $((...)) so old sh are out)


David Laight: