How to run shell scripts?
1) Save the shell file with .sh (e.g. "test.sh") or, open the shell file using vim command to access the shell file in terminal. 2) Now, open the Terminal. 3) Change to the directory where you have saved your shell file. 4) Then, type chmod 0777 test.sh to make your file executable. 5) Type sh test.sh to execute the file.