title: when i open a new tab on my mac terminal on mac, it displays unnecessary code
body: <p>when i open a new tab on my mac terminal, it displays unnecessary code. </p>
  
  <p>This code is spitted on the terminal from the files which terminal loads when it starts,  like .profile, .bash_profile, .bash</p>
  
  <p>Here is the code displayed when i open a new tab. </p>
  
  <pre><code>Last login: Mon Jan 16 15:00:48 on ttys002
  -bash: export: `-s': not a valid identifier
  -bash: export: `/Users/jayparteek/.rvm/scripts/rvm': not a valid identifier
  -bash: export: `]]': not a valid identifier
  -bash: /usr/local/bin[[: No such file or directory
  -bash: /usr/local/bin: is a directory
  </code></pre>
  
  <p>I know this is coming from either of the following files. </p>
  
  <p>.bash_profile</p>
  
  <pre><code>[[ -s "$HOME/.rvm/scripts/rvm" ]] &amp;&amp; . "$HOME/.rvm/scripts/rvm" 
  [[ -s "$HOME/.rvm/scripts/rvm" ]] &amp;&amp; . "$HOME/.rvm/scripts/rvm" 
  [[ -s "$HOME/.rvm/scripts/rvm" ]] &amp;&amp; . "$HOME/.rvm/scripts/rvm" 
  [[ -s "$HOME/.rvm/scripts/rvm" ]] &amp;&amp; . "$HOME/.rvm/scripts/rvm" 
  [[ -s "$HOME/.rvm/scripts/rvm" ]] &amp;&amp; . "$HOME/.rvm/scripts/rvm" 
  [[ -s "$HOME/.rvm/scripts/rvm" ]] &amp;&amp; . "$HOME/.rvm/scripts/rvm" 
  [[ -s "$HOME/.rvm/scripts/rvm" ]] &amp;&amp; . "$HOME/.rvm/scripts/rvm" 
  [[ -s "$HOME/.rvm/scripts/rvm" ]] &amp;&amp; . "$HOME/.rvm/scripts/rvm" 
  
  
  alias gst='git status'
  alias gl='git pull'
  alias gp='git push'
  alias gd='git diff | mate'
  alias gc='git commit -v'
  alias gca='git commit -v -a'
  alias gb='git branch'
  alias gba='git branch -a'
  
  export EDITOR='mate -w'
  
  alias mysql="/usr/local/mysql/bin/mysql"
  alias mysqld="sudo /Library/StartupItems/MySQLCOM/MySQLCOM"
  
  
  export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"[[ -s "$HOME/.rvm/scripts/rvm" ]] &amp;&amp; . "$HOME/.rvm/scripts/rvm" 
  [[ -s "$HOME/.rvm/scripts/rvm" ]] &amp;&amp; . "$HOME/.rvm/scripts/rvm" 
  
  
  /usr/local/bin[[ -s "$HOME/.rvm/scripts/rvm" ]] &amp;&amp; . "$HOME/.rvm/scripts/rvm" 
  </code></pre>
  
  <p>.profile </p>
  
  <pre><code>export BUNDLER_EDITOR=mate
  
  
  alias gco='git co'
  alias gci='git ci'
  alias grb='git rb'
  
  
  
  export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
  </code></pre>
  
  <p>Improved .bash_profile file </p>
  
  <pre><code>source $HOME/.rvm/scripts/rvm
  
  
  alias gst='git status'
  alias gl='git pull'
  alias gp='git push'
  alias gd='git diff | mate'
  alias gc='git commit -v'
  alias gca='git commit -v -a'
  alias gb='git branch'
  alias gba='git branch -a'
  
  export EDITOR='mate -w'
  
  alias mysql="/usr/local/mysql/bin/mysql"
  alias mysqld="sudo /Library/StartupItems/MySQLCOM/MySQLCOM"
  
  
  export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"[[ -s "$HOME/.rvm/scripts/rvm" ]] &amp;&amp; . "$HOME/.rvm/scripts/rvm" 
  [[ -s "$HOME/.rvm/scripts/rvm" ]] &amp;&amp; . "$HOME/.rvm/scripts/rvm" 
  
  
  /usr/local/bin[[ -s "$HOME/.rvm/scripts/rvm" ]] &amp;&amp; . "$HOME/.rvm/scripts/rvm" 
  </code></pre>