unix shell, redirect output but keep on stdin -


I want to take a shell script towards the stdout of a hair process in the following process

    < Li> redirect to stdout in a file
  1. Display the output of the process in real time

I know that I can do something like this

< Pre> #! / Bin / sh / Child & gt; File cat file

but it will not display stdout in real time. For example, if the child was

  #! Users will see "1" and "2" "Printed at the same time"       Use the 

tee :

  ./ child = te file  
/ Pre>

tee will copy its standard input on the command line and also on standard output in any file.


Comments