You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm on fire! :D Just thought of this while I was writing #71: a way to drop columns instead of select them would probably be even clearer in many cases. Consider: tsv-select -f 1,2,3,4,5,6,7,8,9,10,12,13,14,15,16,17,$(seq -s, 19 49) rawdata.tsv
vs. tsv-select --inverse -f 9,18 rawdata.tsv
...or better: tsv-select --inverse 9,18 rawdata.tsv
...because you may want to rearrange what's left: tsv-select -v 9,18 -f 1,43,38 -r last (short option -v, like grep)
In the above example 9 and 18 are still not part of the output despite the -r last, and numbering doesn't shift for other addressing (i.e. 43 wasn't 45 before columns were removed).
Of course, it'd pair well with ranges, too, so they're not mutually exclusive: tsv-select -v 2-9
Trying to include and exclude a field at the same time... should probably just be an error, though that could be annoying at times.
I'm not sold on the name/shortening, either. It'd make more sense for my initial thought (tsv-select -inverse -f 9,18), than the form I'd consider more usable.
The text was updated successfully, but these errors were encountered:
Leaving this open as a separate enhancement from field ranges (Issue #71, PR #77). It's meaningfully different. For tsv-select, when variable line lengths are involved, it actually introduces new functionality, not just a more convenient way to specify fields.
I'm on fire! :D Just thought of this while I was writing #71: a way to drop columns instead of select them would probably be even clearer in many cases. Consider:
tsv-select -f 1,2,3,4,5,6,7,8,9,10,12,13,14,15,16,17,$(seq -s, 19 49) rawdata.tsv
vs.
tsv-select --inverse -f 9,18 rawdata.tsv
...or better:
tsv-select --inverse 9,18 rawdata.tsv
...because you may want to rearrange what's left:
tsv-select -v 9,18 -f 1,43,38 -r last
(short option -v, like grep)In the above example 9 and 18 are still not part of the output despite the
-r last
, and numbering doesn't shift for other addressing (i.e. 43 wasn't 45 before columns were removed).Of course, it'd pair well with ranges, too, so they're not mutually exclusive:
tsv-select -v 2-9
Trying to include and exclude a field at the same time... should probably just be an error, though that could be annoying at times.
I'm not sold on the name/shortening, either. It'd make more sense for my initial thought (
tsv-select -inverse -f 9,18
), than the form I'd consider more usable.The text was updated successfully, but these errors were encountered: