File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change 1
1
# bash
2
2
3
3
> Bourne-Again SHell, an ` sh ` -compatible command-line interpreter.
4
- > See also ` histexpand ` for history expansion.
4
+ > See also: ` zsh ` , ` histexpand ` ( history expansion) .
5
5
> More information: < https://gnu.org/software/bash/ > .
6
6
7
7
- Start an interactive shell session:
8
8
9
9
` bash `
10
10
11
- - Execute a command and then exit :
11
+ - Start an interactive shell session without loading startup configs :
12
12
13
- ` bash -c "{{command}}" `
13
+ ` bash --norc `
14
14
15
- - Execute a script:
15
+ - Execute specific [ c] ommands:
16
+
17
+ ` bash -c "{{echo 'bash is executed'}}" `
18
+
19
+ - Execute a specific script:
16
20
17
21
` bash {{path/to/script.sh}} `
18
22
19
- - Execute a script, printing each command before executing it:
23
+ - Execute a specific script while printing each command before executing it:
20
24
21
25
` bash -x {{path/to/script.sh}} `
22
26
23
- - Execute commands from a script, stopping at the first error :
27
+ - Execute a specific script and stop at the first [ e ] rror :
24
28
25
29
` bash -e {{path/to/script.sh}} `
26
30
27
- - Read and execute commands from stdin:
28
-
29
- ` bash -s `
30
-
31
- - Print the Bash version (` $BASH_VERSION ` contains the version without license information):
31
+ - Execute specific commands from stdin:
32
32
33
- ` bash --version `
33
+ ` {{echo "echo ' bash is executed'"}} | bash `
You can’t perform that action at this time.
0 commit comments