GNU bug report logs -
#34488
Add sort --limit, or document workarounds for sort|head error messages
Previous Next
Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Date: Fri, 15 Feb 2019 14:53:01 UTC
Severity: normal
Tags: fixed
Done: Assaf Gordon <assafgordon <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
>>>>> "EB" == Eric Blake <eblake <at> redhat.com> 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.
This bug report was last modified 6 years and 51 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.