pass stdout as file name for command line util?

前端 未结 5 2093
醉酒成梦
醉酒成梦 2020-11-30 03:23

I\'m working with a command line utility that requires passing the name of a file to write output to, e.g.

foo -o output.txt

The only thing

5条回答
  •  伪装坚强ぢ
    2020-11-30 03:43

    I use /dev/tty as the output filename, equivalent to using /dev/nul/ when you want to output nothing at all. Then | and you are done.

提交回复
热议问题