LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   '7zr t archive.7z |tee file.out' = delay while pipe 'fills' (https://www.linuxquestions.org/questions/linux-general-1/7zr-t-archive-7z-%7Ctee-file-out-%3D-delay-while-pipe-fills-724597/)

alphaniner 05-08-2009 01:41 AM

'7zr t archive.7z |tee file.out' = delay while pipe 'fills'
 
I need to send the output of '7zr t archive.7z' to a file for a script, but I also want the output printed to the screen. So I piped it to tee. Which resulted in great confusion when the screen (and as I later discovered, the output file) only updated twice in the 5 minute process. Apparently pipes have a buffer or some such which seems to be 4096B.

So the question is, is there any way to change the behaviour of the pipe, or is there another way to achieve the desired outcome (output both to a file and to stdout)?


All times are GMT -5. The time now is 05:16 PM.