bash, dash, fish, ksh, rbash, sh, zsh: refresh (#5714)

This commit is contained in:
bl-ue
2021-04-14 10:07:21 -04:00
committed by GitHub
parent 7755ac87fb
commit 16e4ed5c89
9 changed files with 100 additions and 73 deletions

View File

@@ -2,32 +2,32 @@
> Bourne-Again SHell, an `sh`-compatible command line interpreter.
> See also `histexpand` for history expansion.
> More information: <https://gnu.org/software/bash>.
> More information: <https://gnu.org/software/bash/>.
- Start interactive shell:
- Start an interactive shell session:
`bash`
- Execute a command:
- Execute a command and then exit:
`bash -c "{{command}}"`
- Run commands from a file:
- Execute a script:
`bash {{file.sh}}`
`bash {{path/to/script.sh}}`
- Run commands from a file, logging all commands executed to the terminal:
- Execute a script, printing each command before executing it:
`bash -x {{file.sh}}`
`bash -x {{path/to/script.sh}}`
- Run commands from a file, stopping at the first error:
- Execute commands from a script, stopping at the first error:
`bash -e {{file.sh}}`
`bash -e {{path/to/script.sh}}`
- Run commands from stdin:
- Read and execute commands from stdin:
`bash -s`
- Print the version information of bash (use `echo $BASH_VERSION` to show just the version without license information):
- Print the Bash version (`$BASH_VERSION` contains the version without license information):
`bash --version`