Creation of a script to launch several programs


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Creation of a script to launch several programs
# 1  
Old 02-16-2008
Creation of a script to launch several programs

I'm really new to this, so thanks for your patience...

I've been trying to create a script to launch several applications at once. I've been researching books and forums, but I end up with more questions than answers. As much as I hate to say it, I don't know if I can figure it out on my own...

Thus far, I have only been able to get the first app to launch.

So if I have two apps, /apps/abc/abc_1.1/scripts/runabc.sh and /apps/def/def_1.1/scripts/rundef.sh, how can I write a script that will launch them both?

Johnny
# 2  
Old 02-16-2008
Launch them both ?

Did you mean in a serial way or parallel ?

For serial launch,
In a wrapper script

have it as,

fire script1
fire script2
# 3  
Old 02-17-2008
'Both at once' would mean in parallel surely?
Code:
#!/bin/sh
/apps/abc/abc_1.1/scripts/runabc.sh &
/apps/def/def_1.1/scripts/rundef.sh &

This will trigger both scripts then exit.

If either of the scripts write things out to the console they were started from, you might want to redirect their output:
Code:
/apps/abc/abc_1.1/scripts/runabc.sh > /dev/null 2>&1 &

# 4  
Old 02-18-2008
Thank you very much for your posts!

I did mean parallel, just didn't know how to express it... I'm really new to this... It's working for me now...

Are there any tutorials or books that either of you would recommend to help me learn?
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Launch shell script with parameters from a webpage button

I want to create a simple html page that should contain 2 fields in which the user can write the input. Then I want to have a button that should launch a shell script with the parameters inserted by user in the fields from the webpage. This is the code behind my webpage: <html> <form... (2 Replies)
Discussion started by: black_fender
2 Replies

2. Shell Programming and Scripting

Perl script timer on program launch

So I am attempting to get a short but complex perl script to be able to time out an application that I will launch from a command line. The terminal I use is MKS C SHELL and I am having trouble doing the a job spawn that will launch the application and keep time on it. I know you could do this... (1 Reply)
Discussion started by: vas28r13
1 Replies

3. Shell Programming and Scripting

Launch a windows program from perl script

Hi i wanted to know if any one can give me an example on how to launch a windows program in a perl script. I wanted to open the nmap software on my computer with a perl script, i heard this can be done with the system function. Would the function be in this format: $text =... (1 Reply)
Discussion started by: kingbp
1 Replies

4. Shell Programming and Scripting

Shell Script to launch C program

Hi there, im new too shell scripting and was wondering if it is possible to create a shell script to take in a variable and load a c program. My C program is a file monitor, and is started by using the terminal and using to following code ./monitor FileToBeMonitored is it possible to have... (12 Replies)
Discussion started by: gazmcc182
12 Replies

5. UNIX for Dummies Questions & Answers

Are programs like sys_open( ) ,sys_read( ) et al examples of system level programs ?

Are the programs written on schedulers ,thread library , process management, memory management, et al called systems programs ? How are they different from the programs that implement functions like open() , printf() , scanf() , read() .. they have a prefix sys_open, sys_close, sys_read etc , right... (1 Reply)
Discussion started by: vishwamitra
1 Replies

6. Shell Programming and Scripting

Launch Script

Hi all! I just got done writing a script. The problem Im running into is I have to lanuch the script with: sh SCRIPT.sh Is there a way to launch it with by just entering SCIPT into the shell? (3 Replies)
Discussion started by: Grizzly
3 Replies

7. UNIX for Dummies Questions & Answers

How to launch a script from the emacs minibuffer?

Hello! I' m editing a script (script.sh) with emacs, and I would like to launch it from the minibuffer. Is it possible? If I do M-X and then ./script.sh i get the message "no match" ...:confused: (0 Replies)
Discussion started by: vero_81
0 Replies

8. UNIX for Advanced & Expert Users

Can we launch a shell script automatically upon ssh login?

Greetings all, I'll just like to know if it is possible to launch a shell script automatically upon a user's successful login into ssh from a remote host, without adding a command parameter to the ssh command... ie. after keying in ssh username@host (not ssh username@host "command") and upon... (1 Reply)
Discussion started by: rockysfr
1 Replies

9. Shell Programming and Scripting

How to launch a Csh shell script using Excel Macro ?

Hi all. I need to use excel macro at my desktop to launch a csh script which is in a solaris environment. What is the code that i can use in macro to help me with that ? Basically, the code need to telnet or ftp to the solaris environment and just run the script and the macro will output in an... (1 Reply)
Discussion started by: Raynon
1 Replies

10. Solaris

Script to launch terminal window?

Hi, I am a newbie here. Trying to find a way of writing a script to launch multiple terminal or console windows on solaris 9. I used to be able to do this using cmdtool on older versions of solaris and it was even possible to configure the size and screen position of the window and the title. ... (5 Replies)
Discussion started by: omerta
5 Replies
Login or Register to Ask a Question