Horje
shell script multithreaing Code Example
shell script multithreaing
To run multiple programs in parallel:
prog1 &
prog2 &

If you need your script to wait for the programs to finish, you can add:
wait

prog1 & prog2 && fg
This will:
1>Start prog1.
2>Send it to background, but keep printing its output.
3>Start prog2, and keep it in foreground, so you can close it with ctrl-c.
4>When you close prog2, you'll return to prog1's foreground, so you can also close it with ctrl-c.




Shell

Related
greper Code Example greper Code Example
debian build clean Code Example debian build clean Code Example
raspberry install latest kernel Code Example raspberry install latest kernel Code Example
how to upen image in kali linux Code Example how to upen image in kali linux Code Example
Edit remote files within Vim session Code Example Edit remote files within Vim session Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9