Skip to content

Commit e7eae6c

Browse files
author
Emily Grace Seville
authored
bash: refresh page (tldr-pages#7980)
* Refresh a page: - better grammar - better token syntax * Simplify `-s` example
1 parent 014427d commit e7eae6c

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

pages/common/bash.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
# bash
22

33
> Bourne-Again SHell, an `sh`-compatible command-line interpreter.
4-
> See also `histexpand` for history expansion.
4+
> See also: `zsh`, `histexpand` (history expansion).
55
> More information: <https://gnu.org/software/bash/>.
66
77
- Start an interactive shell session:
88

99
`bash`
1010

11-
- Execute a command and then exit:
11+
- Start an interactive shell session without loading startup configs:
1212

13-
`bash -c "{{command}}"`
13+
`bash --norc`
1414

15-
- Execute a script:
15+
- Execute specific [c]ommands:
16+
17+
`bash -c "{{echo 'bash is executed'}}"`
18+
19+
- Execute a specific script:
1620

1721
`bash {{path/to/script.sh}}`
1822

19-
- Execute a script, printing each command before executing it:
23+
- Execute a specific script while printing each command before executing it:
2024

2125
`bash -x {{path/to/script.sh}}`
2226

23-
- Execute commands from a script, stopping at the first error:
27+
- Execute a specific script and stop at the first [e]rror:
2428

2529
`bash -e {{path/to/script.sh}}`
2630

27-
- Read and execute commands from stdin:
28-
29-
`bash -s`
30-
31-
- Print the Bash version (`$BASH_VERSION` contains the version without license information):
31+
- Execute specific commands from stdin:
3232

33-
`bash --version`
33+
`{{echo "echo 'bash is executed'"}} | bash`

0 commit comments

Comments
 (0)