You need to create a shell script named
I suggest creating a
bin directory in your home folder, and storing any scripts you create there. Save the script there with the name
sage, then execute
chmod u+x sage to give your user permission to execute the script.
Now, the last step is to tell bash that it should include any scripts found in
~/bin in your path. To do this edit
~/.bash_profile. You can do
nano ~/.bash_profile or use any text editor you like. Add this to the file:
# Prepend ~/bin to the PATH variable
Save and close
.bash_profile, restart bash, and you should be able launch Sage.app by typing
EDIT: An alias, like the other answer said, is probably a cleaner approach (1 less file to keep track of) if you don't need the logic of a script and just want to launch the app.
I've gotten used to doing it this way as most often I find myself passing a lot of parameters that don't change to an executable, but 1 or 2 that might. So I write the script to accept just those parameters and insert them in the right places when calling the executable. Just something to keep in mind.