ITeye博客

grep: writing output: Broken pipe

standalone · 2009-08-12 15:32 · linux · shell · 编程语言 · Markdown

ls -t $FOLDER | grep "stat"| head -$fileNum

我的python脚本里面call了一个shell脚本,里面有这一行,执行的时候就会有标题这样的warning。原因查了一下,是说head执行完了就exit了,因此grep面对的是一个没有reader的pipe,就是broken pipe了。

不会有啥坏处,不管它也没事,或者把输出的warning重定向到/dev/null也可以。

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。