Subject: /bin/sh `name=value command' anomaly
To: None <netbsd-users@NetBSD.ORG>
From: Jim Wight <J.K.Wight@newcastle.ac.uk>
Date: 03/24/1995 09:44:31
When I run a /bin/sh command of the form `name=value command' under i386
NetBSD 1.0 it fails with the message 'Out of file descriptors'. It
only works as expected if a semicolon is placed after the name=value
part. This is not a requirement of any other /bin/sh that I am familar
with, and shouldn't be necessary according to my interpretation of
this extract from the man page:
If a simple command has been recognized, the shell per-
forms the following actions:
1) Leading words of the form ``name=value'' are stripped
off and assigned to the environment of the simple command.
Redirection operators and their arguments (as described
below) are stripped off and saved for processing.
Is it a bug, or is the semicolon requirement enshrined in POSIX
1003.2, to which /bin/sh apparently conforms?
Department of Computing Science, University of Newcastle, Tel: +44 191 222 8238
Newcastle upon Tyne, NE1 7RU, United Kingdom. Fax: +44 191 222 8232