On 22/11/10 22:21, Pádraig Brady wrote:
> Perhaps something like:
>
> (head --no-header -n1 file.* | head -n1; tail --no-header -n+2 file.* | sort)
>
> I.E. add the --no-header option to suppress the ==> file name <== annotations
> which would allow using `head` and `tail` in general for this.
O
On 22/11/10 17:28, Pádraig Brady wrote:
> On 18/11/10 16:36, Jim Hester wrote:
>> A common problem when sorting files stems from the file containing 1
>> or more header lines, which should not be sorted. As of now, the
>> common solution to this problem is to remove the header lines with
>> manual
Sorry, the command for step 5 was missing:
$ sort-header -S 5M -l 1 -n input_with_header.txt | head -n 5
(When "sort-header" is sort from coreutils version 8.7 patched with Jim
Hester's patch).
On 11/22/2010 03:20 PM, Assaf Gordon wrote:
Hello Jim and all,
On 11/18/2010 11:36 AM, Jim
Hello Jim and all,
On 11/18/2010 11:36 AM, Jim Hester wrote:
A common problem when sorting files stems from the file containing 1
or more header lines, which should not be sorted.
I'm also very much interested in a "header-aware" sort operation.
However, I've found "sort" to require slightly
On 18/11/10 16:36, Jim Hester wrote:
> A common problem when sorting files stems from the file containing 1
> or more header lines, which should not be sorted. As of now, the
> common solution to this problem is to remove the header lines with
> manually, or to output only the non header lines wit
Pádraig Brady wrote:
> FYI https://bugzilla.redhat.com/show_bug.cgi?id=655096
Ouch! Thanks for forwarding that.
Here's one way to test for the bug:
seq 10 > in
mkfifo fifo
(for i in $(seq 12); do read line; echo $i; sleep .1; done
cat > /dev/null) < fifo &
(ulimit -t 1; ./sort i
FYI https://bugzilla.redhat.com/show_bug.cgi?id=655096