2016-01-04 19:55:14 +00:00
|
|
|
# bash
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
> Bourne-Again SHell.
|
2016-01-04 19:55:14 +00:00
|
|
|
> `sh`-compatible command line interpreter.
|
2019-06-09 00:05:27 +01:00
|
|
|
> More information: <https://gnu.org/software/bash>.
|
2016-01-04 19:55:14 +00:00
|
|
|
|
2016-02-23 01:14:41 +00:00
|
|
|
- Start interactive shell:
|
2016-01-04 19:55:14 +00:00
|
|
|
|
|
|
|
`bash`
|
|
|
|
|
2016-02-23 01:14:41 +00:00
|
|
|
- Execute a command:
|
2016-01-04 19:55:14 +00:00
|
|
|
|
2016-09-04 20:59:10 +01:00
|
|
|
`bash -c "{{command}}"`
|
2016-01-04 19:55:14 +00:00
|
|
|
|
2016-02-23 01:14:41 +00:00
|
|
|
- Run commands from a file:
|
2016-01-04 19:55:14 +00:00
|
|
|
|
2016-02-23 01:14:41 +00:00
|
|
|
`bash {{file.sh}}`
|
2016-01-04 19:55:14 +00:00
|
|
|
|
2017-09-21 08:35:20 +01:00
|
|
|
- Run commands from a file, logging all commands executed to the terminal:
|
|
|
|
|
|
|
|
`bash -x {{file.sh}}`
|
|
|
|
|
2019-01-23 06:27:08 +00:00
|
|
|
- Run commands from a file, stopping at the first error:
|
|
|
|
|
|
|
|
`bash -e {{file.sh}}`
|
|
|
|
|
2016-02-23 01:14:41 +00:00
|
|
|
- Run commands from STDIN:
|
2016-01-04 19:55:14 +00:00
|
|
|
|
2016-02-23 01:14:41 +00:00
|
|
|
`bash -s`
|
2016-09-01 14:31:38 +01:00
|
|
|
|
|
|
|
- Print the version information of bash (use `echo $BASH_VERSION` to show just the version string):
|
|
|
|
|
|
|
|
`bash --version`
|