unix:output-redirection

<table class="MRH-njmSb5ZTkfb1o4dqv"><thead><tr class="s6JZe6869f81l9E_5G7Q9"><th class="_3TNkDptlyGOiWXvdX_acOB">syntax</th><th class="_3TNkDptlyGOiWXvdX_acOB">visible in terminal (StdOut)</th><th class="_3TNkDptlyGOiWXvdX_acOB">visible in terminal (StdErr)</th><th class="_3TNkDptlyGOiWXvdX_acOB">visible in file (StdOut)</th><th class="_3TNkDptlyGOiWXvdX_acOB">visible in file (StdErr)</th><th class="_3TNkDptlyGOiWXvdX_acOB">existing file</th><th class="_3TNkDptlyGOiWXvdX_acOB">non-posix</th></tr></thead><tbody><tr class="s6JZe6869f81l9E_5G7Q9"><td class="_1LHijgw3WoeCUe8AUewfUB">&gt;</td><td class="_3DYfYn_cczg1wj_a3hhyV6">no</td><td class="_3DqGFKR55y45L5IxBTgsFz">yes</td><td class="_3DYfYn_cczg1wj_a3hhyV6">yes</td><td class="_3DYfYn_cczg1wj_a3hhyV6">no</td><td class="_3DYfYn_cczg1wj_a3hhyV6">overwrite</td><td class="_3DYfYn_cczg1wj_a3hhyV6"></td></tr><tr class="s6JZe6869f81l9E_5G7Q9"><td class="_1LHijgw3WoeCUe8AUewfUB">&gt;&gt;</td><td class="_3DYfYn_cczg1wj_a3hhyV6">no</td><td class="_3DqGFKR55y45L5IxBTgsFz">yes</td><td class="_3DYfYn_cczg1wj_a3hhyV6">yes</td><td class="_3DYfYn_cczg1wj_a3hhyV6">no</td><td class="_3DYfYn_cczg1wj_a3hhyV6">append</td><td class="_3DYfYn_cczg1wj_a3hhyV6"></td></tr><tr class="s6JZe6869f81l9E_5G7Q9"><td class="_1LHijgw3WoeCUe8AUewfUB">2&gt;</td><td class="_3DYfYn_cczg1wj_a3hhyV6">yes</td><td class="_3DqGFKR55y45L5IxBTgsFz">no</td><td class="_3DYfYn_cczg1wj_a3hhyV6">no</td><td class="_3DYfYn_cczg1wj_a3hhyV6">yes</td><td class="_3DYfYn_cczg1wj_a3hhyV6">overwrite</td><td class="_3DYfYn_cczg1wj_a3hhyV6"></td></tr><tr class="s6JZe6869f81l9E_5G7Q9"><td class="_1LHijgw3WoeCUe8AUewfUB">2&gt;&gt;</td><td class="_3DYfYn_cczg1wj_a3hhyV6">yes</td><td class="_3DqGFKR55y45L5IxBTgsFz">no</td><td class="_3DYfYn_cczg1wj_a3hhyV6">no</td><td class="_3DYfYn_cczg1wj_a3hhyV6">yes</td><td class="_3DYfYn_cczg1wj_a3hhyV6">append</td><td class="_3DYfYn_cczg1wj_a3hhyV6"></td></tr><tr class="s6JZe6869f81l9E_5G7Q9"><td class="_1LHijgw3WoeCUe8AUewfUB">2&gt;1</td><td class="_3DYfYn_cczg1wj_a3hhyV6">no</td><td class="_3DqGFKR55y45L5IxBTgsFz">no</td><td class="_3DYfYn_cczg1wj_a3hhyV6">yes</td><td class="_3DYfYn_cczg1wj_a3hhyV6">yes</td><td class="_3DYfYn_cczg1wj_a3hhyV6">overwrite</td><td class="_3DYfYn_cczg1wj_a3hhyV6">&amp;&gt;</td></tr><tr class="s6JZe6869f81l9E_5G7Q9"><td class="_1LHijgw3WoeCUe8AUewfUB">2&gt;&gt;1</td><td class="_3DYfYn_cczg1wj_a3hhyV6">no</td><td class="_3DqGFKR55y45L5IxBTgsFz">no</td><td class="_3DYfYn_cczg1wj_a3hhyV6">yes</td><td class="_3DYfYn_cczg1wj_a3hhyV6">yes</td><td class="_3DYfYn_cczg1wj_a3hhyV6">append</td><td class="_3DYfYn_cczg1wj_a3hhyV6">&amp;&gt;&gt;</td></tr><tr class="s6JZe6869f81l9E_5G7Q9"><td class="_1LHijgw3WoeCUe8AUewfUB">| tee</td><td class="_3DYfYn_cczg1wj_a3hhyV6">yes</td><td class="_3DqGFKR55y45L5IxBTgsFz">yes</td><td class="_3DYfYn_cczg1wj_a3hhyV6">yes</td><td class="_3DYfYn_cczg1wj_a3hhyV6">no</td><td class="_3DYfYn_cczg1wj_a3hhyV6">overwrite</td><td class="_3DYfYn_cczg1wj_a3hhyV6"></td></tr><tr class="s6JZe6869f81l9E_5G7Q9"><td class="_1LHijgw3WoeCUe8AUewfUB">| tee -a</td><td class="_3DYfYn_cczg1wj_a3hhyV6">yes</td><td class="_3DqGFKR55y45L5IxBTgsFz">yes</td><td class="_3DYfYn_cczg1wj_a3hhyV6">yes</td><td class="_3DYfYn_cczg1wj_a3hhyV6">no</td><td class="_3DYfYn_cczg1wj_a3hhyV6">append</td><td class="_3DYfYn_cczg1wj_a3hhyV6"></td></tr><tr class="s6JZe6869f81l9E_5G7Q9"><td class="_1LHijgw3WoeCUe8AUewfUB">2&gt;&amp;1 1&gt;/dev/null | tee</td><td class="_3DYfYn_cczg1wj_a3hhyV6">yes</td><td class="_3DqGFKR55y45L5IxBTgsFz">yes</td><td class="_3DYfYn_cczg1wj_a3hhyV6">no</td><td class="_3DYfYn_cczg1wj_a3hhyV6">yes</td><td class="_3DYfYn_cczg1wj_a3hhyV6">overwrite</td><td class="_3DYfYn_cczg1wj_a3hhyV6">2&gt; &gt;(tee filename &gt;&amp;2)</td></tr><tr class="s6JZe6869f81l9E_5G7Q9"><td class="_1LHijgw3WoeCUe8AUewfUB">2&gt;&amp;1 1&gt;/dev/null | tee -a</td><td class="_3DYfYn_cczg1wj_a3hhyV6">yes</td><td class="_3DqGFKR55y45L5IxBTgsFz">yes</td><td class="_3DYfYn_cczg1wj_a3hhyV6">no</td><td class="_3DYfYn_cczg1wj_a3hhyV6">yes</td><td class="_3DYfYn_cczg1wj_a3hhyV6">append</td><td class="_3DYfYn_cczg1wj_a3hhyV6">2&gt; &gt;(tee -a filename &gt;&amp;2)</td></tr><tr class="s6JZe6869f81l9E_5G7Q9"><td class="_1LHijgw3WoeCUe8AUewfUB">|&amp; tee</td><td class="_3DYfYn_cczg1wj_a3hhyV6">yes</td><td class="_3DqGFKR55y45L5IxBTgsFz">yes</td><td class="_3DYfYn_cczg1wj_a3hhyV6">yes</td><td class="_3DYfYn_cczg1wj_a3hhyV6">yes</td><td class="_3DYfYn_cczg1wj_a3hhyV6">overwrite</td><td class="_3DYfYn_cczg1wj_a3hhyV6"></td></tr><tr class="s6JZe6869f81l9E_5G7Q9"><td class="_1LHijgw3WoeCUe8AUewfUB">|&amp; tee -a</td><td class="_3DYfYn_cczg1wj_a3hhyV6">yes</td><td class="_3DqGFKR55y45L5IxBTgsFz">yes</td><td class="_3DYfYn_cczg1wj_a3hhyV6">yes</td><td class="_3DYfYn_cczg1wj_a3hhyV6">yes</td><td class="_3DYfYn_cczg1wj_a3hhyV6">append</td><td class="_3DYfYn_cczg1wj_a3hhyV6"></td></tr><tr class="s6JZe6869f81l9E_5G7Q9"><td class="_1LHijgw3WoeCUe8AUewfUB">2&gt; /dev/null | tee</td><td class="_3DYfYn_cczg1wj_a3hhyV6">yes</td><td class="_3DqGFKR55y45L5IxBTgsFz">no</td><td class="_3DYfYn_cczg1wj_a3hhyV6">yes</td><td class="_3DYfYn_cczg1wj_a3hhyV6">no</td><td class="_3DYfYn_cczg1wj_a3hhyV6">overwrite</td><td class="_3DYfYn_cczg1wj_a3hhyV6"></td></tr><tr class="s6JZe6869f81l9E_5G7Q9"><td class="_1LHijgw3WoeCUe8AUewfUB">2&gt; /dev/null | tee -a</td><td class="_3DYfYn_cczg1wj_a3hhyV6">yes</td><td class="_3DqGFKR55y45L5IxBTgsFz">no</td><td class="_3DYfYn_cczg1wj_a3hhyV6">yes</td><td class="_3DYfYn_cczg1wj_a3hhyV6">no</td><td class="_3DYfYn_cczg1wj_a3hhyV6">append</td><td class="_3DYfYn_cczg1wj_a3hhyV6"></td></tr></tbody></table>

Source

  • unix/output-redirection.txt
  • Last modified: 2020-04-26T00:09:21+0200
  • by Wolfgang