title: Ubuntu shell script to open multiple tabs , load bashrc file
body: <p>hi i am doing following steps manually </p>
  
  <ol>
  <li>open terminal (loads ~/.bashrc)</li>
  <li>open 6 tabs</li>
  <li>set titles for each tab</li>
  <li>source libray files <code>source test.sh tab1</code> command with different parameter in each tab.</li>
  <li>run Test (<code>./run.sh</code>) </li>
  </ol>
  
  <p>i tried to automate the above steps uing shell script using gnome-terminal (using following link) , 
  <a href="https://askubuntu.com/questions/500357/opening-multiple-terminal-tabs-and-running-command">https://askubuntu.com/questions/500357/opening-multiple-terminal-tabs-and-running-command</a>
  the tabs are opening but titles are not saving it is resetting and the command <code>source ~/test.sh tab1</code>  giving error "No such file or directory"</p>
  
  <p>Code:</p>
  
  <pre><code>#!/bin/bash
  
  cd /media/Extra/Project
  
  tab=" --tab-with-profile=Default"
  options=(--tab --title=Terminal)
  
  cmds[1]="'source ~/test_1.sh; ./run.sh'"
  titles[1]="test_1"
  
  cmds[2]="'source ~/test_2.sh; ./run.sh'"
  titles[2]="test_2"
  
  
  cmds[3]="'source ~/test_3.sh; ./run.sh'"
  titles[3]="test_3"
  
  cmds[4]="'source ~/test_4.sh; ./run.sh'"
  titles[4]="test_4"
  
  cmds[5]="'source ~/test_5.sh; ./run.sh'"
  titles[5]="test_5"
  
  cmds[6]="'source ~/test_6.sh; ./run.sh'"
  titles[6]="test_6"
  
  for i in 1 2 3 4 5 6; do
      options+=($tab --title="${titles[i]}"  -e "bash -ic \"${cmds[i]} ; bash\"" )     
  done
  
  gnome-terminal "${options[@]}"
  
  exit 0
  </code></pre>