title: Redirect input to a file descriptor?
body: <p>I wrote a script <code>test.sh</code></p>
  
  <pre><code>#!/bin/bash
  #test.sh
  
  echo "This is important message" &gt; /dev/tty
  </code></pre>
  
  <p>When I tried executing on <code>bash</code></p>
  
  <pre><code>./test.sh
  </code></pre>
  
  <blockquote>
    <p>This is important message</p>
  </blockquote>
  
  <p>I usually don't like messages on the terminal   </p>
  
  <pre><code>./test.sh  &gt; /dev/null
  </code></pre>
  
  <p>Okay, the output never went to standard output</p>
  
  <blockquote>
    <p>This is important message</p>
  </blockquote>
  
  <p>That is pretty annoying. I really don't like a few messages that are deliberately dumped onto the terminal. Hence, this is what I did.</p>
  
  <pre><code>exec 3&lt;&gt; /dev/tty
  ./test.sh &gt; /dev/null 3&gt;&amp;1    #Send whatever comes to /dev/tty(3) to /dev/null
  </code></pre>
  
  <p>But that doesn't work as expected.</p>
  
  <blockquote>
    <p>This is important message</p>
  </blockquote>
  
  <p>So what is going wrong? How am I supposed to disappear the output? I really don't want the script to hold my terminal hostage. </p>