tldr/pages/common/bash.md

25 lines
364 B
Markdown
Raw Normal View History

2016-01-04 19:55:14 +00:00
# bash
> Bourne-Again SHell.
2016-01-04 19:55:14 +00:00
> `sh`-compatible command line interpreter.
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
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`