[Top][All Lists]

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

Re: join with header line support

From: Pádraig Brady
Subject: Re: join with header line support
Date: Tue, 26 Jan 2010 11:49:56 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20091204 Thunderbird/3.0

On 05/11/09 09:29, Pádraig Brady wrote:
Assaf Gordon wrote:

Here's an improved version of the '--header' feature for join, with
tests, NEWS, doc updates.

Reminder: with this option, one can join files even if they contain a
header line as the first line.

I'll be happy to provide more examples and use cases, if needed.

The patch is also available here:

Thanks for providing the download as thunderbird is mangling your patch again.
I'll review it and expect to push it soon, unless there are objections.

Sorry for the delay in merging this. Recently we were releasing bug fix builds 

This --header option essentially allows one to use --check-order with headings.
`join` without --check-order will already handle the common case where headings
do match in each file, however using --check-order will fail often when the
header sorts after the first line of data.

Note also that --header will join header lines from each file even if
they don't match, with headings from the first file taking precedence.

There are 2 questions with this.

1. Since this is only specific to --check-order really, perhaps
we should add it as a parameter like --check-order=+N where N
is the number of lines to skip checks on, and output as header lines.

2. Do we want to output headings from the first file
when they don't match the second?

I'll push the attached patch (which has a few tweaks) in a while
unless others want changes as per the questions above.


Attachment: join-header.diff
Description: Text Data

reply via email to

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