Using output of previous commands in bash

后端 未结 5 2521
情书的邮戳
情书的邮戳 2021-02-20 00:50

In Mathematica, it is possible to reuse the output of the previous command by using %.

Is something similar possible for bash (or some other shell)?

For example,

5条回答
  •  轮回少年
    2021-02-20 01:18

    Swap the stdout and stderr streams to log the entire stderr stream:

    make 3>&2 2>&1 1>&3 3>&- | tee /dev/stderr > stderr.log
    

提交回复
热议问题