1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/bash.md
marchersimon 03819122c9
histexpand: add page (#5455)
Also add a reference to the new page in bash.md and zsh.md
2021-04-04 21:07:13 +01:00

666 B

bash

Bourne-Again SHell, an sh-compatible command line interpreter. See also histexpand for history expansion. More information: https://gnu.org/software/bash.

  • Start interactive shell:

bash

  • Execute a command:

bash -c "{{command}}"

  • Run commands from a file:

bash {{file.sh}}

  • Run commands from a file, logging all commands executed to the terminal:

bash -x {{file.sh}}

  • Run commands from a file, stopping at the first error:

bash -e {{file.sh}}

  • Run commands from stdin:

bash -s

  • Print the version information of bash (use echo $BASH_VERSION to show just the version without license information):

bash --version