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

Isoparm

macrumors newbie
Original poster
Jul 15, 2005
18
0
I've got a number of perl programs I run fairly constantly. Right now I open up a tab in terminal and navigate to the directory and launch each one (one by one).

But ideally I'd love to setup up some sort of bash program or something that would launch the all the perl programs just by running that one bash program.

Is that possible? And is it possible to do that so it opens in tabs? (Or at the minimum new terminal windows?)

Thanks
 

nofunsir

Suspended
Dec 30, 2009
83
53
Reno
Ta daa

1) Open terminal.

2) Paste this:

Code:
echo sometemporarytext > ~/Desktop/opensesame.command; chmod +x ~/Desktop/opensesame.command

3) Open opensesame.command (it should be on your desktop) in your favorite text editor (right click, open with...).

4) Replace "sometemporarytext" with:

Code:
echo perl /Path/to/A.pl > launchA.command; #make some temporary bash scripts to open your... 
echo perl /Path/to/B.pl > launchB.command; #...perl scripts, one per perl script that you... 
echo perl /Path/to/C.pl > launchC.command; #...want in a new window.

chmod +x launchA.command; #make sure each of these scripts are executable
chmod +x launchB.command;
chmod +x launchC.command;

open launchA.command; #open each script in a new terminal window
open launchB.command;
open launchC.command;

sleep 1; #wait 1 second before continuing (to avoid deleting the launchers before they have a chance to execute)

rm launchA.command; #delete launchers
rm launchB.command; 
rm launchC.command;

5) Save and close your text editor.

6) You are now free to double-click opensesame.command
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.