Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run 2 commands @ the same time

Status
Not open for further replies.

vodkadrinker

Technical User
May 16, 2002
163
GB
I would like to run two commands at the same time from one script.

For example I would like to run an rcp to another system at the same time as running a cpio on the local system. I thought that you could do this by running a command in the back ground using the &, but it does not seem to work.

Please can anyone let me know how this can be done.
 
Is it possible that the script is finishing before the command in the background has? If so, the background job may be getting killed before completion. Putting a nohup before the background command might solve this as it forces the command to ignore requests to terminate. HTH.
 
Thanks Ken, you have pointed me in the right direction and I have now managed to get things working.

VD
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top