Cheatsheet bash
| Comment | # This is a comment in a bash file |
echo "Hello World!" |
|
| Arguments |
call the script like yourscript.sh arg1 arg2 arg3
|
| if | if [ (condition) ] |
| FOR | for i in `seq 1 10`; # count from 1 to 10 |
| Exit | exit 0 |
| Get return code | echo $? |