Loading...
Shell Script

Executing a Shell Script

The easy way to run shell script in Linux or UNIX is to type the following commands. In the terminal type the following commands.

$ sh myscript.sh

OR

$  bash myscript.sh

Another option is to set an executable permission using the   chmod command are

$chmod +x myscript.sh

And then run the shell script file as follows or we can give the full path of the file.

$ ./myscript.sh
Leave a Reply

Your email address will not be published. Required fields are marked *