title: sudo cat << EOF > File doesn't work, sudo su does
body: <p>I tried the following on the command prompt in bash:</p>
  
  <pre><code>sudo cat &lt;&lt; EOF &gt; /etc/yum.repos.d/some-name.repo
  #Content
  #....
  #...
  EOF
  </code></pre>
  
  <p>It complained :</p>
  
  <pre><code>-bash: /etc/yum.repos.d/some-name.repo: Permission denied
  </code></pre>
  
  <p>Then I did <code>sudo su</code> and tried the exact same thing except the <code>sudo</code> before <code>cat</code>, and it worked without any problem. What am I missing in the above ?</p>