Skip to content

Command

blue-monk edited this page Oct 6, 2021 · 1 revision

🌿 Command structure

csvdiff3 {lhs_file_name} {rhs_file_name} {options}
Argument Description

lhs_file_name

Absolute/Relative path to left-hand side file.

rhs_file_name

Absolute/Relative path to right-hand side file.

options

Optional arguments.

🌿 Frequently used options

Option

Description

Default

short

long

e.g.

-h

--help

Show help message and exit.

e.g.

csvdiff3 -h

--version

Show program’s version number and exit.

e.g.

csvdiff3 --version

-k

--matching-keys

Matching key indices for Input CSV in CSV format.
(like index1,index2,…​)

Matching key index is 0 based.

For non-fixed length numbers, specify the number of digits after :.
(like index1:maxLength1,index2,…​)

0

e.g.

csvdiff3 left.csv right.csv -k 1
csvdiff3 left.csv right.csv -k 0,1
csvdiff3 left.csv right.csv -k 0:8,3
csvdiff3 left.csv right.csv -k 0:8,3:5

-u

--unique-key

Specify if the matching key is unique.
Then, if it detects that the matching key is not unique,
an error will occur.

False

e.g.

csvdiff3 left.csv right.csv -u

-i

--ignore-columns

Specify the index of the column to be ignored in CSV format.

Column index is 0 based.

[]

e.g.

csvdiff3 left.csv right.csv -i 4
csvdiff3 left.csv right.csv -i 4,6

-d

--show-difference-only

Report the lines with the difference.
Can be used with option -c.
Cannot be used with option -a.

False

e.g.

csvdiff3 left.csv right.csv -d

-a

--show-all-lines

Report on all lines.
Can be used with option -c.
Cannot be used with option -d.

False

e.g.

csvdiff3 left.csv right.csv -a

-c

--show-count

Report the number of differences.
Treat this as True if neither -d nor -a is specified.

False

e.g.

csvdiff3 left.csv right.csv -c

(↑ This is equivalent to no options ↓)

csvdiff3 left.csv right.csv

-v

--vertical-style

Report in vertical style.
If not specified, report in horizontal(two facing) style.

False

e.g.

csvdiff3 left.csv right.csv -v

-H

--header

If specified, this specification will be enforced.

n

No header

y

With Header

None

e.g.

csvdiff3 left.csv right.csv -H n
csvdiff3 left.csv right.csv -H y

-x

--show-context-from-arguments

Report the context
generated from the arguments and CSV sniffing.

False

e.g.

csvdiff3 left.csv right.csv -x
Clone this wiki locally