Execute 2 Commands at the same time


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Execute 2 Commands at the same time
# 1  
Old 07-28-2010
Execute 2 Commands at the same time

Hi @all

I have got the following problem:

I want my Master-Script to execute 2 Sub-scripts at the same time.
How can i realize that?

Thx for your help

Greez Roger
# 2  
Old 07-28-2010
Code:
nohup script1 2>&1 > log1 &
nohup script2 2>&1 > log2 &
wait

This User Gave Thanks to jim mcnamara For This Post:
# 3  
Old 07-28-2010
Thx for ur answer

Can u explain me what the command really does?

i splitted up the sub-script into 2 sub-script by reason that the script will be executed faster.
does your command meet that conditions?

Thx a lot

EDIT: OK i tested it, it works nice =) thank you

Last edited by DarkSwiss; 07-28-2010 at 11:07 AM.. Reason: i tested it
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to execute telnet commands thru xterm?

I want to launch an xterm telnet window: xterm -e telnet xxx.xxx.xx.xxx Which I can do but needs to also launch commands as well. Please use CODE tags as required by forum rules! (2 Replies)
Discussion started by: shopgirl08
2 Replies

2. Shell Programming and Scripting

How to execute multiple commands in one shot?

for example: I'm greping the process where i can get the location of the file $ ps -ef | grep LLAWP | awk {'print $9'} | tail -1 /Hostname/ihs/INSTANCE2/conf/WebAgent.conf then I need to display second line of WebAgent.conf file: $ cat /Hostname/ihs/INSTANCE1/conf/WebAgent.conf | head... (2 Replies)
Discussion started by: raghur77
2 Replies

3. Shell Programming and Scripting

Execute bcp commands from SQSH

Hi I am using SQSH to construct 10-20 bcp commands that I would like to execute. I can write all to file and open and do a for loop in the file. My question is if there is some way I can skip the file part and somehow pipe out the resulting dataset from SQSH and execute those directly? My... (1 Reply)
Discussion started by: bicm_mike
1 Replies

4. Shell Programming and Scripting

execute multipe commands

I would like to execute multipe commands in a shell script. Please provide the commands for the below scenario: Execute command1 if command1 is succesfull, then execute command2, command3,command4 in parallel if command2, command3,command4 are success then run command 5 (3 Replies)
Discussion started by: p_gautham12
3 Replies

5. UNIX for Dummies Questions & Answers

commands to execute unix script

commands to execute unix script (1 Reply)
Discussion started by: sunilamarnadh
1 Replies

6. Shell Programming and Scripting

Command to execute commands one after other

I am writng a script in which there is an installation file.The installer runs good. But after the installer command there are some files and commands which are based on those installed files. Now problem is the commands get executed before the installer is totally installed. So is there any... (5 Replies)
Discussion started by: sriki32
5 Replies

7. Shell Programming and Scripting

Execute multiple commands in a find

I am checking that a file is older than a reference file that I build with a touch command before processing it. If it is not old enough, I want to sleep for an hour and check again. My problem is if it is old enough to process, I want to exit when I am done, but I cannot find a way to exit... (2 Replies)
Discussion started by: prismtx
2 Replies

8. UNIX for Advanced & Expert Users

Execute All Commands in A contrl File

Hi , I have a situation i need to write a while loop until the end of control file.In the control file i have a 5 lines which contains commands.how can i execute all with out waiting for the first one to complete. Ex ControlFile: ScripitName Test ScriptName Test1 ScriptName Test2 ... (1 Reply)
Discussion started by: ukatru
1 Replies

9. Shell Programming and Scripting

Can BASH execute commands on a remote server when the commands are embedded in shell

I want to log into a remote server transfer over a new config and then backup the existing config, replace with the new config. I am not sure if I can do this with BASH scripting. I have set up password less login by adding my public key to authorized_keys file, it works. I am a little... (1 Reply)
Discussion started by: bash_in_my_head
1 Replies

10. Shell Programming and Scripting

how do i get my script to execute multiple commands?

New to shell scripting. I can't get my script to execute multiple commands. Here's the code. It's a menu script. #!/bin/ksh clear print "SDE MENU" PS3="SDE MENU, enter choice:" select clean_menu in "tasdedev instance 5151" "orkindev instance 5155" "tasdetst instance 5157" "orkinsys... (1 Reply)
Discussion started by: hvincent
1 Replies
Login or Register to Ask a Question