URL: <https://savannah.gnu.org/bugs/?66154>
Summary: documentation bug about "$?" Group: The GNU Bourne-Again SHell Submitter: shynur Submitted: Sun 01 Sep 2024 04:24:03 AM CST Category: None Severity: 3 - Normal Item Group: None Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any _______________________________________________________ Follow-up Comments: ------------------------------------------------------- Date: Sun 01 Sep 2024 04:24:03 AM CST By: 谢骐 <shynur> I'm reading the Bash Reference Manual, section 3.4.2 [https://gnu.org/s/bash/manual/html_node/Special-Parameters.html]: ($?) Expands to the exit status of the most recently executed foreground pipeline. ^^^^^^^^^^^^^^^^^^^ I think this is a documentation bug because: $ ls nonexistent-file # returned 2 ls: cannot ... $ true & # which is not a foreground pipeline $ echo $? 0 Am I missing something? _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?66154> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
signature.asc
Description: PGP signature