All without any luck, they both work but only open a new shell once the command has finished or I kill the process.
I really need the script to open multiple shells at the same time and continue till the end.
You might want to post your script. I tried the following:
#!/bin/bash
echo "starting"
xterm -e "sleep 5"; &
echo "see the xterm"
ls
sleep 1
exit
And got a syntax error near unexpected token "&" - when I removed the ; and moved the & over one, then it ran with no issue (with the xterm popping up running the command and the original script continuing on and exiting before the xterm went away which I believe is what you are looking for)
Thanks RTM, after removing the ";" and moveing the "&" over it ran like a charm, all I have to do now is play around with "sleep" so the shell opens at the correct time.
Thanks again.
Regards
For Nilesrex: The error you received is should show more information.
In your example, is there anything more to the error message?
(Also, please start a new thread next time you have a question instead of hijacking someone else's thread - it makes it harder to answer everyone involved. Thanks.)