I need to run several Bash scripts (the same script with different variables to be precise) at the same time. To keep the number of tabs under control, I wish to group them in a single terminal tab.
The scripts regularly output, which I check for any problem.
If I send them to the background as
./script.sh 1 & ./script.sh 2 & ./script.sh 3 & ./script.sh 4
I will lose control over them. For example, I terminate the script by Ctrl+C. With the above code, I should find the
pid for each process to kill them.
Note that the above code is the content of my main script (say
./all_scripts.sh) rather than commands to be typed in the terminal.
Is there a way to run the script in the same terminal while treating them as a single outputting script?