Desktop Icon to run terminal commands

cjs1

Registered
I would like to create a Desktop Icon under OSX which will execute a series of terminal commands and on termination return back to the desktop. I am sure this straight-forward can someone please advise where to start.

Thanks.
 
save the commands you want to run as text using your favorite text editor

chmod +x to make it executable

then rename it and add .command as the file extension, double click and it should open terminal and run itself

it might leave the focus on the terminal though, im not sure
 
Append this command to the end of your script to return to the Finder after it has finished running:
open /System/Library/CoreServices/Finder.app
 
Back
Top