Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions comm
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Print lines appearing in both <file-1> and <file-2>:
comm -12 <(sort file1.csv) <(sort file2.csv)

# Print lines appearing only in <file-1>:
comm -23 <file-1> <file-2>
# Print lines appearing only in the first file (sort both inputs for comm):
comm -23 <(sort file1.csv) <(sort file2.csv)

# Print lines appearing only in the second file:
comm -13 <(sort file1.csv) <(sort file2.csv)

# For diffing CSVs from a database, consider:
# https://aswinkarthik.github.io/csvdiff/