If you are a terminal user you probably already know you can create an alias
in your favorite shell to run any command you want, but that presupposes that
you already have a Terminal window open.
How do you create an icon you can double-click to run a command in a new Terminal window? For example, you could create an icon you can double click on to launch an interactive ssh session to a server you frequenly log into.
There are two ways.
Regardless of which method you choose, you can now put an icon on the file.
Find an image with a preview icon you like. Or, if you have an image that doesn't have a preview icon, you can fix that with a simple application like ThumbsUp available from www.devon-technologies.com.
Install the ThumbsUp application and simply drag an image file onto its application icon. The file will get a preview icon that matches its content.
Once you have an image file with a preview icon you like, select the file in the finder (so it is highlighted) and the press apple-C to "copy" the icon.
Now find the script file created above. Select it in the finder and click apple-i to "Get Info" on the file. At the top of the Info window you will see the script icon associated with the file. Click it once and it will get a light blue halo around it. Now press apple-V to "Paste" the icon. The icon for the script should change to the one you copied above.
That's it! Now you can double-click the icon and it will launch the command in an interactive Terminal window.