bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#34488: Add sort --limit, or document workarounds for sort|head error


From: 積丹尼 Dan Jacobson
Subject: bug#34488: Add sort --limit, or document workarounds for sort|head error messages
Date: Fri, 15 Feb 2019 22:43:48 +0800

Things start out cheery, but quickly get ugly,

$ for i in 9 99 999 9999 99999; do seq $i|sort -n|sed 5q|wc -l; done
5
5
5
5
sort: write failed: 'standard output': Broken pipe
sort: write error
5
sort: write failed: 'standard output': Broken pipe
sort: write error

Therefore, kindly add a sort --limit=n,
and/or on (info "(coreutils) sort invocation")
admit the problem, and give some workarounds, lest
our scripts occasionally spew error messages seemingly randomly,
just when the boss is looking.

And no fair saying "just save the output" (could be big) "into a file
first, and do head(1) or sed(1) on that."





reply via email to

[Prev in Thread] Current Thread [Next in Thread]