I want to run xterm -e file.sh without terminating.
In the file, I'm sending commands to the background and when the script is done, they are still not finished.
What I'm doing currently is:
(cd /myfolder; /xterm -ls -geometry 115x65 -sb -sl 1000)
and then after the window pops up
sh file.sh
exit
What I want to do is something like:
(cd /myfolder; /xterm -ls -geometry 115x65 -sb -sl 1000 -e sh file.sh)
without terminating and wait until the commands in the background finish.
Anyone know how to do that?
screen
as a terminal manager instead of using a graphical terminal manager? Take a look at www.gnu.org/s/screen/. Packages are available for all flavours of linux (in their default package repos). You can then connect screen to the terminal manager of your choice. Not the solution you're looking for, but a better option in the long run. – Massifwait
shell builtin. It waits for and reports the commands sent to the background with&
. You'll need to use at the end of your script. It'll keep your script from terminating till all background jobs are finished. – Massif