How to run the .sh file in shell script in Linux?
Posted: Thu May 20, 2010 3:33 am
.sh file is nothing but a shell script. The easiest way to run .sh shell script in Linux is as follows:
Another option is set executable permission using chmod command:
Now run .sh file as follows: execute
Code: Select all
sh file.sh
Code: Select all
bash file.sh
Code: Select all
chmod +x file.sh
Code: Select all
./file.sh