shell中的小trick
#systemProgramming
(1) define functions in shell
1) open a <file>, write your function
2) source <file>
3) then you can use your function in shell
(2) special variable
`$?`: the error code of your previous shell command
`$_`: the last argv of your previous command
(3) small trick
`!!`: shell will replace your !! to be your previous command
(4) difference between double and single quote
variables in double quote can be replaced by its value, while in single quote cannot.