How can I run multiple .sh
scripts from one .sh
script and run them all in separate terminals? I already have
/root/A.sh & /root/B.sh & /root/C.sh
The issue is it runs all of these in the same terminal at the same time, and without the &'s
, it runs them when the previous one is finished running, how can I make them all startup at the same time in separate terminals?
With
konsole
, you can havee.g.
You can also set the window's title (depends on the version)
With
xterm
:You can launch your preferred terminal program (i.e. rxvt, xterm, etc) and pass the command to be executed as an option, as in (for instance):
This assumes you're running on the local console with an X server and window manager.
Here is a tutorial on how to configure screen for multiple shell sessions and here is another tutorial on using screen
edit
you can check this for using screen and 2 other alternatives for multiprocessing shell
I'm not at my pc right now, so I can't test this...
Try including the following in your main script to start sh (or whatever shell you prefer) invoking your script as a background task to stop the main script blocking.
Kev
Here is one way leveraging gnome terminal tabbing capability :