Subject: Re: /bin/sh bug or not?
To: None <mycroft@ai.mit.edu>
From: Chet Ramey <chet@odin.INS.CWRU.Edu>
List: current-users
Date: 05/11/1995 11:33:49
>    Posix.2 says that any
>    command line that does not contain a command to be executed after
>    expansion should return the status of any command substitution
>    performed while expanding the command, or zero if no command
>    subsitution occurs. 
> 
> Please cite the *exact* text from POSIX.2 which specifies that.  When
> I looked, the wording was quite unclear, but seemed to imply the
> NetBSD behaviour.

Fine.  1003.2-1992, section 3.9.1 (Simple Commands), page 136.

``If there is a command name, execution shall continue as described
  in 3.9.1.1.  If there is no command name, but the command contained
  a command substitution, the command shall complete with the exit
  status of the last command substitution performed.  Otherwise, the
  command shall complete with a zero exit status.''

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer

Chet Ramey, Case Western Reserve University	Internet: chet@po.CWRU.Edu