title: Bash script - stdout file descriptor?
body: <p>I have the following in my script:</p>
  
  <pre><code>OUTFILE=./output.log
  echo "foo" &gt;&gt; ${OUTFILE}
  </code></pre>
  
  <p>It works just fine when <code>OUTFILE</code> is an actual file path. However, sometimes I'd like to see the output on stdout by modifying <code>OUTFILE</code> but it doesn't work. I tried with <code>1</code> and <code>&amp;1</code>, both quoted and unquoted, as well as leaving it empty.<br>
  It just keeps telling me this:</p>
  
  <pre><code>./foo.sh: line 2: ${OUTFILE}: ambiguous redirect
  </code></pre>