Features |
Requirements |
Screenshots |
Usage |
Parameters |
Example |
Contact |
csvdiff summary page |
Download |
perl csvdiff.pl -a Actual-Result -e Expectedt-Result -s ";" -c Columnames -t -i -k 2
Usage: csvdiff.pl
Parameters:
-e File1
Expected Result
-a File2
Actual Result
-c File3
Columnames in csv format (in one Line!), optional
-k Keycolumn(s)
Keycolumn(s), optional (separatet by the same separator used for data)
count starts with 1, if you want to use multiple keys do like "3,1"
which meens the third and the first colums together are the unique key
-s Separator
Fieldseparator, optional (default=,)
-t
Trim leading and tailing blanks, optional
-v
Print csvdiff version and quit
-g
Grade/sort data before comparision, this has only effect when there are no key column
-i
Ignor upper and lower case, optional
-f
Fade out column(s) for compare, optional
-h
Help, optional
-d
coloured Output which looks like diff
-D
Debug, optional
mysrv:~/csvdiff$ perl csvdiff.pl -a act.csv -e exp.csv -s ";" -c col_names.csv -k "2" -t -i 2>&1 |more
Record with key "200100500" is different:
Actual line 006 > 200100500;200100500;6;;;;;;000;0;2005-12-20;55 <
Expected line 008 > 200100500;200100500;6;;;;;;000;0;2005-12-19;55 <
Difference in field no.: 11 - field name: Dat_Rueckgabe
Actual > 2005-12-20 <
Expected > 2005-12-19 <
-------------------------------------------------------------------------------
Record with key "230101901" is different:
Actual line 001 > 230101900;230101901;3;;Dummy Dummy;;;;;;;22 <
Expected line 005 > 230101900;230101901;3;;dummy dummy;;;;;;;22 <
Difference in field no.: 05 - field name: GebNachname
Actual > Dummy Dummy <
Expected > dummy dummy <
-------------------------------------------------------------------------------
Key: "bar_1" exists only in expected result exp.csv
Expected: foo;bar_1;7;;;;;;;;;a1
-------------------------------------------------------------------------------
Key: "bar_xyz" exists only in actual result act.csv
Actual line 5: foo;bar_xyz;;test;;;;;;;;12345
-------------------------------------------------------------------------------
Key: "barbar" exists only in expected result exp.csv
Expected: foo;barbar;hello;;;;;;;;;mx
mysrv:~/csvdiff$