Running parallel process

Thread Tools Search this Thread
# 8  
script1 > filea &
script2 > filea &
script3 > filea &
script4 > filed &
cat filea fileb filec filed > bigfile

# 9  
Originally Posted by sagar_1986
No need to shout.

I figured log_1, log_2, log_3, etc were scripts since you were obviously running them. Hence, mystified what you were trying to do.
# 10  
could be like this:-


sh > 1.log
sh > 2.log
sh > 3.log
sh > 4.log

cat *.log > combine.log

then run sh you could see all output combine in 1 file...



sh > 1.log
sh >> 1.log
sh >> 1.log
sh >> 1.log

then run sh you could see all output combine in 1 file...

Last edited by Scrutinizer; 05-23-2012 at 02:59 PM..
# 11  
but dear friends its not working

after the all scripts completed its not coming out of that script


Code: & & &

log_1 > new.txt
log_2 >> new.txt
log_3 >> new.txt

its running all the script but its not executing the appending operation of log.

take one example.


while [ $i le 20 ]
echo "$1"
i=`expr $i + 1`



the script is getting held at 5 its not operation after this stage as we have to append the logs of four scripts into one
# 12  
If you have GNU Parallel GNU Parallel - GNU Project - Free Software Foundation installed you can do this:
parallel '{} >{.}.out' ::: sample*.sh

seq 4 | parallel "sample{}.sh > {}.out"

You can install GNU Parallel simply by:
    chmod 755 parallel
    cp parallel sem

Watch the intro videos for GNU Parallel to learn more:
This User Gave Thanks to tange For This Post:

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Monitoring processes in parallel and process log file after process exits

I am writing a script to kick off a process to gather logs on multiple nodes in parallel using "&". These processes create individual log files. Which I would like to filter and convert in CSV format after they are complete. I am facing following issues: 1. Monitor all Processes parallelly.... (5 Replies)
Discussion started by: shunya
5 Replies

2. Shell Programming and Scripting

Running script in Parallel

Hi Folks I have a doubt. I have a script which is running with 2 input parameters ./ <jobnumber> Parmfile.txt I need to run the script in parallel for different jobnumbers. The commands are ./ jnhuc14500 Parmfile.txt ./ jnhuc14501... (3 Replies)
Discussion started by: morbid_angel
3 Replies

3. Shell Programming and Scripting

Script running in parallel failing!

Hi, I have a single script that was running fine in parallel on Linux 2.6.9-89 now it has been upgraded to Linux 2.6.18-308.24.1.el5 and the script has started to fail unpredictably. Is this an upgrade issue? As the script runs fine for some parallel threads while fails for others. Please... (4 Replies)
Discussion started by: Panna
4 Replies

4. Shell Programming and Scripting

Multiple child running parallel

Hi , I am using sun Solaris machine. The machine description is given below SunOS ptxsa021 5.9 Generic_118558-24 sun4u sparc SUNW,Sun-Fire-15000 I am using korn shell.the scripts is below Parent code is given is the part of code #!/bin/ksh # Script Name:... (3 Replies)
Discussion started by: ashutosh2378
3 Replies

5. Shell Programming and Scripting

Running jobs in parallel

I need to process 50 sqlplus scripts which are listed in a text file. I need to develop a shell script that'll read this file and run these sqlplus scripts. At any point of time, the number of sqlplus scripts running shouldn't exceed 6. If any of the sqlplus scripts completes successfully then... (17 Replies)
Discussion started by: gctex
17 Replies

6. Shell Programming and Scripting

Running shell script in parallel

Hi, I am a shell script which takes input parameters and performs various functions. My concern is, if we call the same shell script with different parameter values from different sessions, will the results be inconsistent? Are there any precautions I need to take inorder to avoid conflicts... (1 Reply)
Discussion started by: jamjam10k
1 Replies

7. UNIX and Linux Applications

How can i see if a unix Process Aplication i.e oracle is running in parallel

There is a unix process process in oracle running and i see running by typing ps -fea|grep GE_CLIENTES. The question is How can i see if this process is running in paralel. I dont know with a Unix command or specifically its a comand from Oracle. I kow a Parallel process ia a process that... (1 Reply)
Discussion started by: alexcol
1 Replies

8. IP Networking

running servers parallel

I'm going to undertake a hardware refresh soon and I was wondering if it is possible to run two machines (X and Y) with the same hostname (but different IP addresses) on the same network? Server X is the original server and has an entry in DNS. Server Y is the new server and won't have an entry... (1 Reply)
Discussion started by: soliberus
1 Replies

9. Shell Programming and Scripting

Running scripts in parallel

Hi, Iam having the scripts as follows. i jus want to run those in parallel. main aim is to minimise the time for overall execution of the script. now out.txt is having 1 lac records. script1( split -1000 out.txt splitout ls -A splitout* > filelist.txt cat filelist.txt... (6 Replies)
Discussion started by: nivas
6 Replies

10. Programming

running a parallel program

hi , i need to run a parallel program . for example; program1 { array=" the second program should called here : program 2" the execution should continue } the 2nd program should recieve an array of information as argument and it should... (4 Replies)
Discussion started by: bankpro
4 Replies

Featured Tech Videos