In this blog post, I will show you how to run a Bash script from a Linux server Bash shell terminal.
By default, running scripts is not possible if they don’t have run permissions on the file system.
Create script
The process to allow running Bash scripts is to first create the script with a .sh file extension as shown below:
touch script.sh
Give permissions
After creating the file, lets give it run permissions.
chmod u+x script.sh
Run
And finally to run the script, use.
.\script.sh
Processing…
Success! You're on the list.
Whoops! There was an error and we couldn't process your subscription. Please reload the page and try again.