When writing bash scripts it is often helpful to do the things that you want the script to do manually, at the command prompt.
At the command line, how would you:
- make a file executable?
- check that you have made it executable?
You have already mentioned the chmod and ls commands as being useful.
Once you have found the commands you want the script to run, edit them into a file:
Code:
!/bin/bash
<first command>
<second command>
Then make the file executable (you know how to do that!) and run it with ./<script file name> or bash <script file name>.