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: Sat, 16 Feb 2019 00:53:07 +0800

>>>>> "EB" == Eric Blake <address@hidden> writes:

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

EB> If you have an app that exits noisily on write failures to an early-exit
EB> pipe, your solutions are to quit ignoring SIGPIPE, or to change the
EB> pipeline to consume all of the output instead of exiting early and
EB> causing write failure.

OK, it seems that indeed it would then be best to document:

     If you want to make sure no such errors occur on large output,
     instead of
     $ sort | head
     use
     $ sort > file; head file

as an _easy to remember_ alternative amongst the many.

And OK put this in some general place, and have the sort, etc. pages
link to it. Thanks.





reply via email to

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