bug-bash
[Top][All Lists]
Advanced

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

Re: Problems with command substitution and command alias


From: Robert Elz
Subject: Re: Problems with command substitution and command alias
Date: Sat, 21 Nov 2020 23:32:47 +0700

    Date:        Sun, 22 Nov 2020 00:04:21 +0900
    From:        Hyunho Cho <mug896@gmail.com>
    Message-ID:  
<CAMMw473RabokMM-+CbUv+S+XX+ZHWn14g9sgNNkmRmZ8KO_ypQ@mail.gmail.com>


  | if command does not exist then the command stop with "command not found"
  | error but the command substitution executed completely

Yes, the args to any command are evaluated (which includes expanding command
substitutions and doing any redirections) before any attempt is made to
execute the command -- it needs to be, as the attempt to execute the command
actually executes it if it succeeds, so the args must be available for it,
and any redirected fd's already redirected.

kre




reply via email to

[Prev in Thread] Current Thread [Next in Thread]