Content deleted Content added
Blush30720 (talk | contribs) →Definitions: Move the paragraph on delineating lines from character streams down from subsection Execution to subsection Syntax Tag: Reverted |
Blush30720 (talk | contribs) →Observability: Move paragraph on Thompson comments into subsection xtrace; delete subsection Comments; moving it to section Definitions Tag: Reverted |
||
Line 1,457:
[x] Description and visual example of xtrace
[x] How to enable and disable xtrace
[x] Thompson-style comments visible in xtrace
[x] xtrace re POSIX
-->
Line 1,476 ⟶ 1,477:
$
</syntaxhighlight>
The {{Mono| xtrace}} shell setting is specified by POSIX.▼
See also {{section link||Debugging}}.▼
=== The {{mono| verbose}} option ===▼
<!-- Important concepts:▼
[x] Saying something about Verbose mode▼
-->▼
The verbose option prints strings to the terminal as they are read, and before any expansions are performed. Rarely used.<ref>See {{Code| set -v| bash}} in the documentation.</ref>▼
Comments denoted with a colon character, {{char|:}}, originated with the [[Thompson shell]].<ref>
Line 1,521 ⟶ 1,499:
:<syntaxhighlight lang="console">
$
$ set -x
$ : "${foo}"
+ : bar
$
</syntaxhighlight>
▲The {{Mono| xtrace}} shell setting is specified by POSIX.
▲See also {{section link||Debugging}}.
▲=== The {{mono| verbose}} option ===
▲<!-- Important concepts:
▲ [x] Saying something about Verbose mode
▲-->
▲The verbose option prints strings to the terminal as they are read, and before any expansions are performed. Rarely used.<ref>See {{Code| set -v| bash}} in the documentation.</ref>
=== Exit codes ===
Line 1,540 ⟶ 1,527:
[x] Lack of standardization
-->
When bash executes commands, [[exit status]] codes, also called "return codes," are produced which can offer some insight into the manner in which a program ceased running.
The value of the most recently captured exit code is held within the shell parameter, 'question mark:' {{Code| $? }}.
|