Print on terminal and into file simultaneously?

后端 未结 3 1403
臣服心动
臣服心动 2020-12-15 14:55

I have a shell script that greps some data.. I want to print the result into a file, but doing that prevents the result being displayed on the terminal. Is there a way that

3条回答
  •  一向
    一向 (楼主)
    2020-12-15 15:28

    Does exactly your thing

    http://linux.die.net/man/1/tee

提交回复
热议问题