Home
| Calendar
| Mail Lists
| List Archives
| Desktop SIG
| Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings Linux Cafe | Meeting Notes | Linux Links | Bling | About BLU |
Tom Metro wrote: > Dwight E Chadbourne wrote: > >> Two people are handing me CSV files and I don't care about what they >> agree on. > > > If you want to see differences at the record (line) level, try: > > % diff --old-line-format=%L --new-line-format=%L > --unchanged-line-format="" data1.csv data2.csv > diff.csv > > diff.csv should end up with none of the lines that are identical in the > two source files, and only contain the lines that differ. Or this: comm -23 data1.csv data2.csv > unique1.csv comm -13 data1.csv data2.csv > unique2.csv cat unique1.csv unique2.csv I think both the diff-based solution and the comm-based solution require the files to be sorted; the catch is that in this brave new world of Unicode and locales, a file that is "sorted" by one utility may not be recognized as "sorted" by another. So sanity-check your output. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
BLU is a member of BostonUserGroups | |
We also thank MIT for the use of their facilities. |