title: Vertical bar in shell script?
body: <p>I'm dealing with inherited shell scripts, and have encountered a syntax I've never seen before. </p>
  
  <pre><code>host = 192.[mask]
  port = 2[mask]
  
  ( echo open ${host} ${port}
      ...about six other commands
    echo exit ) | telnet
  </code></pre>
  
  <p>Now, this makes sense up to the vertical bar. Just commands to open and run commands on a server.</p>
  
  <p>But what's the <code>telnet</code> call actually doing? What does this syntax (of parens and bar) mean? My best guess from this implies that it opens telnet, then runs the following commands from within telnet, but I'd like to be sure.</p>