How can I make my shell script executable
You first need to start your script with
'#!/bin/bash '
and save it as <filename>.sh Also make sure that you keep the permissions as a+x i.e all users can execute the script.
You need to add the following shebang line to the top of your code.
#!/bin/bash
You also need to ensure that the script has executable permissions by running:
chmod a+x <filename>.sh