Bash output stream write to a file

后端 未结 4 1249
庸人自扰
庸人自扰 2020-12-11 08:22

so i am running this on bash:

# somedevice -getevent

What this command does is it just keeps running, and everytime my device sends a certa

4条回答
  •  不思量自难忘°
    2020-12-11 08:37

    You can try 'tee':

    somedevice -getevent | tee -a my_record_file
    

    The '-a' option is to append instead of just replacing the content.

提交回复
热议问题