1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 17:42:07 +02:00
tldr/pages/common/bash.md
KRyTeX1337 1cbe37d410
bash: add restricted shell command (#10325)
* Update bash.md

* Update pages/common/bash.md

---------

Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2023-06-08 17:04:40 +02:00

37 lines
790 B
Markdown

# bash
> Bourne-Again SHell, an `sh`-compatible command-line interpreter.
> See also: `zsh`, `histexpand` (history expansion).
> More information: <https://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}}`
- Execute a specific script while 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`