several command in background

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers several command in background
# 1  
Old 07-19-2011
several command in background

hi everyone!

I would like to know if someone can tell me how to run several command in background on one line.
I already tried thisi:
cmd1 &; cmd2 &; cmd3 &
--->produce an error syntax
cmd1 ; cmd2 ; cmd3 &
--->don't execute in bg
cmd1 & cmd2 & cmd3 &
--->execute asynchronously (cmd3 finish before cmd2)


Je vais peut-être me rabatre sur la création d'un script qui contiendra mas commandes, et j'executerais ce script en bg..

C'est chiant mais si il n'existe pas d'autres soluces
# 2  
Old 07-19-2011
You mean something like this?

Please use the search feature first.
This User Gave Thanks to pludi For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Sudo ssh with command running in background

I am trying to run a command. This is one of my attempts: for i in fileservera; do ssh -t $i 'sudo ls /';doneThis works, and I see the directories. However, what I want to do now is start a process on the remote server such as /usr/bin/connectproc -standalonesudo /usr/bin/connectproc... (1 Reply)
Discussion started by: newbie2010
1 Replies

2. Linux

Not able to put ls -lR command in background

Hi All, i am trying to put ls -lRt command to run in the background but it fails. i continue to get output on screen and didnt get the command prompt right after i put the command in background. command i am using is ls -lRt & i am using bash. Can someone let me know how to... (6 Replies)
Discussion started by: omkar.jadhav
6 Replies

3. Shell Programming and Scripting

Capture output of command triggered in background

Is there any way to trigger a sequence of commands in parallel and capture their output in variables? e.g. something on the following lines x=`echo "X" &` y=`echo "Y" &` z=`echo "Z" &` so that $x, $y, and $z evaluate to X, Y and Z res. (7 Replies)
Discussion started by: jawsnnn
7 Replies

4. Solaris

running command in background

hi all i am running following command ufsdump 0ubf 512 /dev/rmt/0cbn /database/backup2/rman_backup/level1 >> /database/backup2/backup_tape/level1_rman_03aug12 2>&1; i want to run it in background how can i do it in this i am generating logs for backup. the problem occurs when i am... (3 Replies)
Discussion started by: nikhil kasar
3 Replies

5. Shell Programming and Scripting

Run command in background thru script

Dear All, Writing a script in which I want to run a command in background and keep it running even script is finished. I have tried like below, `truss -p <pid> >> & /tmp/log &` But doesnt work.. script goes running and nothing in log file. (7 Replies)
Discussion started by: Deei
7 Replies

6. Shell Programming and Scripting

command to see process running at background

Hi , I want to see all the background process that are running in unix box machine...please guide me is there any specific command for that..since I am executing some scripts at background..!!:confused: (1 Reply)
Discussion started by: nks342
1 Replies

7. AIX

Command executing to be in the background !

Guys I'm working to make in AIX script and I have some commands need to be excited by that script Like the below commands ... startsrc -s sshd I want that executing to be in the background of the system I do not like to see the out put of that (3 Replies)
Discussion started by: Mr.AIX
3 Replies

8. UNIX for Dummies Questions & Answers

kill a command I am running / then put it to background

I have a command running in the foreground (and so my term window is locked up) and I want to kill it, then resume it in the background and go home. It is creating a zip file, and the file will be written to the current directory - no std in / std out issues. How do I do this? Kill it with a... (3 Replies)
Discussion started by: hindesite
3 Replies

9. Shell Programming and Scripting

recording command outputs in background

For example: % ls /store > list.txt % less list.txt % 1.txt % 2.txt I want to execute 'ls' in verbose and store the result in background to 'list.txt' so i dont have to execute another command just to view the contents of the 'list.txt' % ls /store > list.txt % 1.txt % 2.txt %... (2 Replies)
Discussion started by: jehrome_rando
2 Replies
Login or Register to Ask a Question