A NOTE has been added to this issue. ====================================================================== http://austingroupbugs.net/view.php?id=1150 ====================================================================== Reported By: kre Assigned To: ====================================================================== Project: 1003.1(2016)/Issue7+TC2 Issue ID: 1150 Category: Shell and Utilities Type: Omission Severity: Editorial Priority: normal Status: New Name: Robert Elz Organization: User Reference: Section: 2.6.3 Page Number: 2357 - 2358 Line Number: 75182 - 75224 Interp Status: --- Final Accepted Text: ====================================================================== Date Submitted: 2017-06-16 01:33 UTC Last Modified: 2017-06-16 16:33 UTC ====================================================================== Summary: exit status of command substitution not properly specified ======================================================================
---------------------------------------------------------------------- (0003777) shware_systems (reporter) - 2017-06-16 16:33 http://austingroupbugs.net/view.php?id=1150#c3777 ---------------------------------------------------------------------- Re: "There is what is said in 2.9.1 about a=$(command) which uses the status of command as the status of the assignment, when there is no command word, but that is the only case that is explicit." This can be construed that assignments and redirections are not included, and command as used there is only the words that are what should be the command name and any arguments. Example: a="" $(does-not-write-a-command-to-stdout-but-exits-5) argish1 would have the 5 as new value for $?. If the command name does not name a function, built-in, or file on the path, the result from the command substitution would override the 127 return of "command not found". I'm not saying this is the intent, just that it can be read that way and lead to some of the differences discussed. Issue History Date Modified Username Field Change ====================================================================== 2017-06-16 01:33 kre New Issue 2017-06-16 01:33 kre Name => Robert Elz 2017-06-16 01:33 kre Section => 2.6.3 2017-06-16 01:33 kre Page Number => 2357 - 2358 2017-06-16 01:33 kre Line Number => 75182 - 75224 2017-06-16 01:46 kre Note Added: 0003766 2017-06-16 06:10 stephane Note Added: 0003767 2017-06-16 09:38 joerg Note Added: 0003768 2017-06-16 09:54 joerg Note Added: 0003769 2017-06-16 10:06 kre Note Added: 0003770 2017-06-16 10:16 joerg Note Added: 0003771 2017-06-16 10:21 joerg Note Edited: 0003771 2017-06-16 11:07 kre Note Added: 0003772 2017-06-16 15:38 stephane Note Added: 0003773 2017-06-16 15:52 joerg Note Added: 0003774 2017-06-16 15:59 joerg Note Edited: 0003774 2017-06-16 16:05 stephane Note Added: 0003775 2017-06-16 16:19 kre Note Added: 0003776 2017-06-16 16:33 shware_systems Note Added: 0003777 ======================================================================