On Sat, Jan 7, 2012 at 4:25 AM, Ole Tange <[email protected]> wrote:
> On Thu, Dec 29, 2011 at 9:47 PM, Matt Oates (Home) <[email protected]>
> wrote:
>> On 15 December 2011 21:36, Ole Tange <[email protected]> wrote:
>>> As it is now, you can run:
>>>
>>> parallel -a table_file.tsv --skip-first-line --colsep '\t' cmd
>>> -o {1} -i {2}
:
> --header will now parse the first line and you can use column names as
> {colname}
>
> You can now do:
>
> printf "a\tb\n1.2\t3/4.5" | parallel --header echo {b} {a} {b.} {b/}
> {b//} {b/.};
>
> Please test it, but regard it as experimental and thus do not depend on it.
--header will be changed later today:
--header regexp
Use upto regexp as header. For normal usage the matched header
(typically the first line: --header '\n') will be split using --colsep
(which will default to '\t') and column names can be used as
replacement variables: {colname}. For --pipe the matched header will
be prepended to each output.
Please test this and give feed back on that.
/Ole