Basically, Bash Shell can be used in 3 different ways:
1) interactive shell
2) shell scripting
3) interactive session
Key concepts in Shell
1) Pipeline A | B : the output of A turns to be the input of B.
2) Redirection > and >>: Use ">" to overwrite any existing file, use ">>" to append to any existing file. In both cases, if no file exists, one is created.
3) command processor: #!/bin/bash
It is the path of the executable bash.
4) execute mode: chmod 755 ***.sh
5) Branching: if []/then-else-fi
6) Loops and Repetition:
for [] do XXX done; while [] do XXX done;7) Value $ : get the value of a variable.8) read & select9) string operations10) array operations11) function with parameters function test { $1 exit; }12) critical commands: file, find, grep, pwd, sort, whereis, date, ls, echo,
No comments:
Post a Comment