Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

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.
Comment

PREVIOUS NEXT
Code Example
Shell :: commentaire bash 
Shell :: bat to delete all ".trashed" files in subfolders 
Shell :: awesomewm change keyboard layout debian 
Shell :: step by step to insatll jenkins in docker from scratch 
Shell :: where is zshrc in big sur 
Shell :: xfce4-notes install 
Shell :: Fix SSH Error in Terminal & Linux: client_loop: send disconnect: Broken pipe 
Shell :: fat-free migration 
Shell :: Accessing .NET components from Powershell 
Shell :: can i connect ubuntu laptop and desktop for file transfer 
Shell :: kill SIGUSR2 
Shell :: install msno in jupyter notebook 
Shell :: gnome terminal keep open 
Shell :: cpanel /home/cPanelInstall 
Shell :: Clear showmount -a result 
Shell :: install coreutils 
Shell :: change webcam whitebalance ubuntu 
Shell :: fenser öffnet sich nicht powreshell 
Shell :: wrapping token in vault 
Shell :: bash map lenght 
Shell :: virtuaboxl with kubernetes 
Shell :: retour chariot avec echo bash 
Shell :: bat auskommentieren 
Shell :: Running setup.py install for pyahocorasick ... error 
Shell :: install imamgemagic 
Shell :: how to search terminal histroy for a command 
Shell :: run docker without iptables 
Shell :: npm unpublish versino 
Shell :: bower install 
Shell :: how to install any new frameworks or libraries in centos 
ADD CONTENT
Topic
Content
Source link
Name
6+9 =