Linux: bash script
This is for advanced bash programming study. Not the basic bash commands!
- methods to execute bash script
Suppose we have a test bash script test.sh as:
# my first bash script
echo "Hello World!"
If it is successfully executed, "Hello World!" txt will be printed on your terminal screen.
- bash test.sh
- sh test.sh
- ./test.sh
The first two methods will be executed without difficult, the third method usually require that you give the .sh file the permission to be executed.
- basic grammar of bash script
- comment
comments this line
- find contents