title: TCP connection, bash only
body: <p>I found this line in a script. While I globally understand what it does--opening a bidirectional TCP connection--, I need some explanations on the syntax. Here's the line:</p>
  
  <pre><code>exec 5&lt;&gt;"/dev/tcp/${SERVER}/${PORT}"
  </code></pre>
  
  <p>And my questions:</p>
  
  <ol>
  <li><code>&lt;</code> and <code>&gt;</code> are usually used to redirect IOs. What does it mean there? Is it usable in another context? How?</li>
  <li>Why does it work, while <code>/dev/tcp</code> doesn't exists? </li>
  <li>Why 5? Can it be another number? What are the values allowed?</li>
  <li>Why is <code>exec</code> necessary? (given nothing is actually <em>executed</em>)</li>
  </ol>
  
  <p>Thanks.</p>