1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 00:22:08 +02:00
tldr/pages/common/bash.md
Vitor Henrique 1ba7fb9460
pages*: add missing mnemonics (#12151)
* pages*: add missing mnemonics

---------

Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>
Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2024-02-19 19:43:42 +05:30

37 lines
791 B
Markdown

# bash
> Bourne-Again SHell, an `sh`-compatible command-line interpreter.
> See also: `zsh`, `histexpand` (history expansion).
> More information: <https://www.gnu.org/software/bash/>.
- Start an interactive shell session:
`bash`
- Start an interactive shell session without loading startup configs:
`bash --norc`
- Execute specific [c]ommands:
`bash -c "{{echo 'bash is executed'}}"`
- Execute a specific script:
`bash {{path/to/script.sh}}`
- E[x]ecute a specific script, printing each command before executing it:
`bash -x {{path/to/script.sh}}`
- Execute a specific script and stop at the first [e]rror:
`bash -e {{path/to/script.sh}}`
- Execute specific commands from `stdin`:
`{{echo "echo 'bash is executed'"}} | bash`
- Start a [r]estricted shell session:
`bash -r`