Shell
Run commands simultaneously
Solution
-
Suppose I want to run 3 commands simultaneously (Like submitting 3 Hadoop jobs)
sh ./test1.sh & sh ./test2.sh & sh ./test3.sh & wait # You might want to wait for the above command to complete then proceed
-
&
lets the program to run in background -
Note, if you want to kill it, you will have to find its pid and run
kill pid