forked from jqnatividad/qsv
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This implements a new flag for the command `diff`. When activated, it drops the values of fields that are equal within a row of type `Modified` and replaces them with the empty string (an empty byte slice to be precise). For now, the value for replacing equal values is not configurable, but should be trivial to add in the future. Note that key field values are _not_ dropped and always appear in the output. Example: csv_left.csv col1,col2,col3 1,foo,bar csv_right.csv col1,col2,col3 1,foo,baz qsv diff --drop-equal-fields csv_left.csv csv_right.csv Output: diffresult,col1,col2,col3 -,1,,bar +,1,,baz See jqnatividad#2000
- Loading branch information
Jan Riemer
committed
Sep 8, 2024
1 parent
f9cc559
commit 2beb709
Showing
2 changed files
with
225 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters