tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: /bin/sh redirect without command failure mode



On Sun 25 Nov 2018 at 02:38:20 +0700, Robert Elz wrote:
> However POSIX does not specify which behaviour is appropriate
> for a redirect when there is no utility (special builtin, or otherwise)
> at all.

Maybe this:

    If there is no command name, any redirections shall be performed in
    a subshell environment; it is unspecified whether this subshell
    environment is the same one as that used for a command substitution
    within the command. (To affect the current execution environment,
    see the exec special built-in.) If any of the redirections performed
    in the current shell execution environment fail, the command shall
    immediately fail with an exit status greater than zero, and the
    shell shall write an error message indicating the failure. See
    Consequences of Shell Errors for the consequences of these failures
    on interactive and non-interactive shells.

from
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_01

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert  -- "What good is a Ring of Power
\X/ rhialto/at/falu.nl      -- if you're unable...to Speak." - Agent Elrond

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index