[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-datamash] datamash: selecting columns that include dashes
From: |
Renato Alves |
Subject: |
[Bug-datamash] datamash: selecting columns that include dashes |
Date: |
Wed, 24 Jul 2019 09:00:48 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 |
Dear Assaf,
I'm trying to use datamash to aggregate and subset TSV data.
If I use integers for column identifiers everything works as expected.
$ datamash -H sum 2
sum(A_Chlor_T1h_r1-metaG)
22960
However if I try to specify column names datamash gets confused with the dash
in the column name
$ datamash -H sum A_Chlor_T1h_r1-metaG
datamash: field range for 'sum' must be numeric
I tried different variations of single ('' or "") and double quoting ("''" or
'""') as well as escaping ("\-" or '\-') but couldn't find a way to subset
using the column name.
Since the order of columns is not maintained on all the files I'm using, using
position-based indexing is unreliable.
Is there some syntax that allows selecting column names that contain dashes?
Additionally, is there any kind of support for wildcards when using column
names? (i.e. something like "A_Chlor_T*")
Kind regards,
Renato
signature.asc
Description: OpenPGP digital signature
- [Bug-datamash] datamash: selecting columns that include dashes,
Renato Alves <=