|
@@ -2,32 +2,32 @@
|
|
|
|
|
|
> Bourne-Again SHell, an `sh`-compatible command line interpreter.
|
|
> Bourne-Again SHell, an `sh`-compatible command line interpreter.
|
|
> See also `histexpand` for history expansion.
|
|
> 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`
|
|
`bash`
|
|
|
|
|
|
-- Execute a command:
|
|
|
|
|
|
+- Execute a command and then exit:
|
|
|
|
|
|
`bash -c "{{command}}"`
|
|
`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`
|
|
`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`
|
|
`bash --version`
|