I have a bunch of commands seperated by
\ns that I'd like to execute serially (from the command line) in a file called
ec2-env-setup. I'd appreciate any help.
This is called a script.
Right click on the text file, select properties, select permission, mark the "Let this file be executed" text box. Now you can execute it just by double clicking on the file.
You can also do it from the console like this:
Or change the permissions and afterwards execute it:
You need to make it excecutable:
And then run it (this will work if you are in the same directory as it, otherwise, use an absolute path).
Just for future reference, and to counter some of the command-line love going on here :-) you can also open the Properties of the file, select the Permissions pane and enable the Executable flags. If you then double-click the file, it'll let you run it as a script.
You might want to run it in the Terminal though if you'd like to see the output.
You can also create a Launcher. Right click on the Desktop and select Create Launcher to do that.