redirect - slow update after pipe, stout, stderr redirection and saving file at the same time -


i'm saving output of command after redirecting stdout, stderr , passing through pipe. things seem working fine i'm noticing delay in bash screen update <= 37 seconds.

the same delay see when checking output file "tail -f output-ping.txt". i've never seen such delay earlier ping nor think happening cause of tee. because of numerous redirections being performed? thoughts! thanks.

ping google.com 2>&1 | awk '{ print strftime("%y-%m-%d %h:%m:%s"), $0; }' | tee -a output-ping.txt

i tried myself , needed flush awk stream, dropped str line, think there no problem there

ping google.com 2>&1 | awk '{ print $0, fflush() }' | tee -a pepe.txt 

Comments

Popular posts from this blog

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

c++ - Convert big endian to little endian when reading from a binary file -

openssl - Load PKCS#8 binary key into Ruby -