2016-01-04 20:55:14 +01:00
|
|
|
# bash
|
|
|
|
|
2016-01-07 18:31:27 +01:00
|
|
|
> Bourne-Again SHell.
|
2016-01-04 20:55:14 +01:00
|
|
|
> `sh`-compatible command line interpreter.
|
2019-06-09 00:05:27 +01:00
|
|
|
> More information: <https://gnu.org/software/bash>.
|
2016-01-04 20:55:14 +01:00
|
|
|
|
2016-02-22 20:14:41 -05:00
|
|
|
- Start interactive shell:
|
2016-01-04 20:55:14 +01:00
|
|
|
|
|
|
|
`bash`
|
|
|
|
|
2016-02-22 20:14:41 -05:00
|
|
|
- Execute a command:
|
2016-01-04 20:55:14 +01:00
|
|
|
|
2016-09-04 20:59:10 +01:00
|
|
|
`bash -c "{{command}}"`
|
2016-01-04 20:55:14 +01:00
|
|
|
|
2016-02-22 20:14:41 -05:00
|
|
|
- Run commands from a file:
|
2016-01-04 20:55:14 +01:00
|
|
|
|
2016-02-22 20:14:41 -05:00
|
|
|
`bash {{file.sh}}`
|
2016-01-04 20:55:14 +01: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 07:27:08 +01:00
|
|
|
- Run commands from a file, stopping at the first error:
|
|
|
|
|
|
|
|
`bash -e {{file.sh}}`
|
|
|
|
|
2021-01-31 14:05:18 -03:00
|
|
|
- Run commands from stdin:
|
2016-01-04 20:55:14 +01:00
|
|
|
|
2016-02-22 20:14:41 -05:00
|
|
|
`bash -s`
|
2016-09-01 14:31:38 +01:00
|
|
|
|
2020-10-19 18:50:30 +02:00
|
|
|
- Print the version information of bash (use `echo $BASH_VERSION` to show just the version without license information):
|
2016-09-01 14:31:38 +01:00
|
|
|
|
|
|
|
`bash --version`
|