nano name.of.the.script
... enter your script starting with #/usr/bin/env bash on the very first line...
Control-O Control-X to save and exit nano
chmod +x name.of.the.script
./name.of.the.script # to invoke the script
Suggest against using TextEdit (creates more problems then it is worth to untangle). If you must use a GUI text editor, then download the free TextWrangler (google will find it).
I just remembered another trick you can use. If you name the file something.command (the important thing being .command as the end of the file name), and you have made it executable using the
chmod +x something.command
then you can double click on the file, and it will launch Terminal, then exeucte the commands in the something.command file. Of course the 'something' can be anything you want as long as it ends in .command
You might like this better.
Message was edited by: BobHarris