title: Linux proc/pid/fd for stdout is 11?
body: <p>Executing a script with stdout redirected to a file. So /proc/$$/fd/1 should point to that file (since stdout fileno is 1). However, actual fd of the file is 11. Please, explain, why.</p>
  
  <p>Here is session:</p>
  
  <pre><code>$ cat hello.sh
  #!/bin/sh -e
  ls -l /proc/$$/fd &gt;&amp;2
  
  $ ./hello.sh &gt; /tmp/1
  total 0
  lrwx------ 1 nga users 64 May 28 22:05 0 -&gt; /dev/pts/0
  lrwx------ 1 nga users 64 May 28 22:05 1 -&gt; /dev/pts/0
  lr-x------ 1 nga users 64 May 28 22:05 10 -&gt; /home/me/hello.sh
  l-wx------ 1 nga users 64 May 28 22:05 11 -&gt; /tmp/1
  lrwx------ 1 nga users 64 May 28 22:05 2 -&gt; /dev/pts/0
  </code></pre>