Jason Koo

      Stay hungry, Stay foolish!

导航

2013年10月30日

摘要: This article is copied fromhttp://www.pixelbeat.org/programming/stdio_buffering/I found it difficult to figure out what buffering was applied to the standard streams.Consider for example the following unix shell pipeline:$ command1 | command2Here the shell forks off 2 processes and connects them usi 阅读全文

posted @ 2013-10-30 15:57 Jason Koo 阅读(335) 评论(0) 推荐(0) 编辑

摘要: It’s a common problem. You write some shell command like:$ tail -f /var/log/foo | egrep -v 'some|stuff' | sed | awkand wonder why nothing is printed, even though you know some text has matched. The problem is that stdio is being buffered, and there’s a very good write-up of the problemhereso 阅读全文

posted @ 2013-10-30 15:23 Jason Koo 阅读(242) 评论(0) 推荐(0) 编辑