title: Mountain Lion, export $PATH to .bash_profile, permission denied?
body: <p>I can do this:</p>
  
  <pre><code>sudo nano .bash_profile
  </code></pre>
  
  <p>But when I do this:</p>
  
  <pre><code>sudo echo 'export PATH="$HOME/.rbenv/bin:$PATH"' &gt;&gt; ~/.bash_profile
  </code></pre>
  
  <p>I get this error message:</p>
  
  <pre><code>-bash: /Users/mycomputer/.bash_profile: Permission denied
  </code></pre>
  
  <p>When I do ls -al:</p>
  
  <pre><code>-rw-r--r--   1 root         staff     27 10 Aug 12:22 .bash_profile
  </code></pre>