What does “1>&2” mean in bash?
<p>What does <code>1&gt;&amp;2</code> mean in a bash script?</p>
<p>For instance, what does the following line from a bash script do?</p>
<pre><code>echo &quot;$1 is not a directory!&quot; 1&gt;&amp;2
</code></pre>
<p>I use MacOS X. My bash script is:</p>
<pre><code>if [ ! -d $1 ]; then
    echo &quot;$1 is not a directory&quot; 1&gt;&amp;2
    exit 1
fi
</code></pre>