Register | Login

In order to run a shell script we need to use the following command.


$ sh test.sh


sh will point the shell and execute the script called test.sh


Another method is to execute by changing the permission of the shell script


chmod 755 test.sh


./test.sh


Note: In this method it is mandatory that you need to use she-bang code in the top of your script. Add the below line to the top of your script.


#!/bin/bash



Who Voted for this Article



YourWiz.com, is a website that will allow everyone to share their knowledge, tip or information through community micro blogging.