Hi Seiduna!
You will want to put it all on one line, after the "-e", or you could put it into a script and just run the script with "-e".
Code:
xterm -e "echo 'hello world'; sleep 2; echo 'hello again'; sleep 10"
# OR
echo "echo 'hello world'; sleep 2; echo 'hello again'; sleep 10" > test.sh
xterm -e sh ./test.sh
Keeping it open is a different problem... But if what you want is a bash prompt after the script is finished, try simply running your desired shell as the last command, like this:
Code:
xterm -e "echo 'hello world'; sleep 2; echo 'hello again'; sleep 2; /bin/bash -l"
I hope this helps!
-J