PDA

View Full Version : Bash Scripting - Running Two Commands Simultaneously



squirrelplayingtag
September 7th, 2007, 07:48 PM
I'm developing a bash script but I've run into a little bit of trouble. First I open a new terminal and issue a command but then I want the rest of my script to run while the command in the new terminal is issued. For example I have


xterm -e "ping www.google.com && read" &
wget $url

So I want the ping command running while the wget runs.

HermanAB
September 7th, 2007, 07:50 PM
Read up on 'job control' the commands 'bg' and 'fg' especially.

Cheers,

H.

squirrelplayingtag
September 7th, 2007, 08:05 PM
Oh that is fantastic. I think I pretty much had it but didn't realize what it was called. Thank you.