|
From: | Chet Ramey |
Subject: | Re: Doc on simple command expansion |
Date: | Thu, 3 Mar 2022 10:39:57 -0500 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 |
On 3/3/22 6:11 AM, Glen Huang wrote:
If one of the expansions contained a command substitution, the exit status of the command is the exit status of the last command substitution performed. If there were no command substitutions, the command exits with a status of zero.Which seems to indicate that for a simple command like this echo "$(false)" echo's return status should be determined by that of false, which is apparently not the case. So I wonder what scenario this paragraph is describing?
Your selective quoting applies to the case where there is no command word (like `echo') and the simple command consists only of assignment statements. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
[Prev in Thread] | Current Thread | [Next in Thread] |