I need to write a batch file which can return the c开发者_如何学Pythonontrasted text between two csv files.
So for instance if
file1.csv
has:
"a,b,c,d,e,f,g,h"
and file2.csv
has:
"a,b,c,d,e"
I need to return:
",f,g,h"
and save it to a new file.
I've tried using the COMP and DIFF (GNU DiffUtils) commands, but haven't been able to get the simple output format I need. I only need the contrasted data between the two files. Does anyone know of a free tool I can use for this?
Many thanks,
-Will
Would this be enough for you?
cat file1.csv | cut -d, -f6-
(How would the content of file2.csv need to be of influence?)
e.g.
echo "a,b,c,d,e,f,g,h" | cut -d, -f6-
f,g,h
Edit additionally, there is http://os.ghalkes.nl/dwdiff.html This will result in quite different output formats though
精彩评论