Open Terminal with multiple tabs and execute application

Posted by user172001 on Ask Ubuntu See other posts from Ask Ubuntu or by user172001
Published on 2013-07-02T12:52:01Z Indexed on 2013/11/01 4:17 UTC
Read the original article Hit count: 205

I am new to linux shell scripting. I want to write a shell script which will open terminal with multiple tabs; it should run rtsp client app in each tab.

For this, I have gone through question here in this forum and tried to code like bellow,

tab="--tab-with-profile=Default -e "
cmd="java RunRTSPClient"
for i in 1 2 3 4 5
   do
#   
   foo="$foo $tab $cmd"         
   done
gnome-terminal $foo
exit 0

This is running and opens the terminal window with tabs but suddenly it will close. I am not getting any errors.

© Ask Ubuntu or respective owner

Related posts about command-line

Related posts about bash