Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a new feature to
tsv-select
, the ability to exclude fields. Fields to exclude are specified with the--e|exclude
option. Some examples:This PR also improves performance of the
--rest
operator. This is done by bulk appending fields from the last specified field until the end of the line. The difference is dramatic for data streams with many fields. These performance improvements apply to--exclude
as well, as it uses the implementation of--rest
. Ad hoc tests on OS X indicate meaningful improvement for operations liketsv-select -f 1 --rest first
(move first field to end of line). Andtsv-select --exclude 1
is dramatically faster thancut -f 2-
for files with a reasonable number of fields (tested on a 29 field file against GNUcut
on OS X).Documentation for
tsv-select
was also improved.The new
--exclude
option implements enhancement request #72, though with some syntactic differences.