mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-23 05:02:10 +02:00

Co-authored-by: marchersimon <50295997+marchersimon@users.noreply.github.com> Co-authored-by: Seth Falco <seth@falco.fun> Co-authored-by: Patrice Denis <patricedenis@users.noreply.github.com>
33 lines
693 B
Markdown
33 lines
693 B
Markdown
# bash
|
|
|
|
> Bourne-Again SHell, an `sh`-compatible command-line interpreter.
|
|
> See also `histexpand` for history expansion.
|
|
> More information: <https://gnu.org/software/bash/>.
|
|
|
|
- Start an interactive shell session:
|
|
|
|
`bash`
|
|
|
|
- Execute a command and then exit:
|
|
|
|
`bash -c "{{command}}"`
|
|
|
|
- Execute a script:
|
|
|
|
`bash {{path/to/script.sh}}`
|
|
|
|
- Execute a script, printing each command before executing it:
|
|
|
|
`bash -x {{path/to/script.sh}}`
|
|
|
|
- Execute commands from a script, stopping at the first error:
|
|
|
|
`bash -e {{path/to/script.sh}}`
|
|
|
|
- Read and execute commands from stdin:
|
|
|
|
`bash -s`
|
|
|
|
- Print the Bash version (`$BASH_VERSION` contains the version without license information):
|
|
|
|
`bash --version`
|