xxxxxxxxxx
include
#!/bin/bash
then in terminal
chmod +x <filename>
./<filename>
xxxxxxxxxx
chmod +x file.sh # Give execute permissions to the .sh file
./file.sh # Run the .sh file
xxxxxxxxxx
# Give the script file correct permssions $chmod 744 <name of scipt file e.g script.sh>
$ chmod 744 script.sh
#now the file is ready to run run it with $ ./<name of scirpt file e.g. script.sh>
$ ./script.sh
xxxxxxxxxx
include
#!/bin/bash (1st line inside yourfile.sh)
to run
./yourfile.sh
if you do not include that line
bash yourfile.sh
xxxxxxxxxx
$ chmod 744 script.sh
#now the file is ready to run run it with $ ./<name of scirpt file e.g. script.sh>
$ ./script.sh
xxxxxxxxxx
# method 1
chmod +x <filename>
./<filename>
# method 2
sh <filename>.sh
# method 3 (Only for bash script)
bash <filename>.sh