Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

satyam90

macrumors regular
Original poster
Jul 30, 2007
242
0
Bangalore, India
I wrote some perl script to track some process and network parameters statics. The perl script file is in my HOME directory. It will be run using the command "/usr/bin/perl $HOME/perlfile.pl" from terminal.
For running this task, I want to create some shortcut on my desktop and assign some icon to it. So that when user double clicks the icon on my desktop, it must the command and show me the statistics. How to achieve it.
Does any one did this type of task before?
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
One way is to make a new .command file with a text editor, and put in the commands you want executed. When double-clicking, it will open in Terminal and run. You need to set the permissions on it though.

You can just output whatever data you need to show in Terminal, or write an AppleScript to wrap the command and display it in a dialog. This might be a better since you can then save the script as a .app to run.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.