The syslog output sent to stdout, grepped, becomes truncated in the middle of the line

So, I am logging some debugging information by sending it to stdout, after which I am ready for the line. At some point, logging is done and the application expects material, but grep output is truncated in the middle of the line. Thus, it corresponded to a string, but did not output the entire string.

Is there any way to get grep to reset?

Thank.

UPDATE: It seems that buffering using a string will help.

+5
source share
1 answer

, grep, -line-buffered. , stdout . stdout , , , .

, -line-buffered (, uniq), stdbuf (http://www.pixelbeat.org/programming/stdio_buffering/stdbuf-man.html), .

. http://www.pixelbeat.org/programming/stdio_buffering/ .

+3

All Articles