Home > computers > linux > bash > bashunbuffered | About

The output of grep is unbuffered when to stdout, buffered otherwise. So commands like tail -f | grep | yourscripthere won't get immediate output from grep until it reaches around 4K bytes. What you can do is use –line-buffered in order to tell grep to spit its output line by line as it's used to.

so tail -f | grep | script becomes tail -f | grep –line-buffered | script

source


contact : @ychaouche yacinechaouche at yahoocom


QR Code
QR Code bashunbuffered (generated for current page)