Forrest logo
back to the csv-diff tool

csv-diff:tldr:430b5

csv-diff: Display a human-readable summary of differences between files that includes unchanged values in rows with at least one change.
$ csv-diff ${filename1-csv} ${filename2-csv} --key=${column_name} --show-unchanged
try on your machine

This command is used to compare two CSV files (filename1.csv and filename2.csv) and highlight the differences between them based on a specific column's values.

  • ${filename1-csv} and ${filename2-csv} are placeholders for the actual CSV file names that you would input. For example, if your first file is called "data1.csv" and the second file is called "data2.csv", you would replace ${filename1-csv} with "data1.csv" and ${filename2-csv} with "data2.csv" in the command.

  • --key=${column_name} is an option that specifies the column name used as a key to compare the files. You need to replace ${column_name} with the actual name of the column you want to use as a key. For example, if you want to compare the files based on a column named "ID", you would replace ${column_name} with "ID".

  • --show-unchanged is another option that tells the command to display the unchanged rows in the output. By default, the command would only show the differences between the files, but with this option, it will also show the rows that are the same in both files.

Overall, this command is used to compare two CSV files and display the differences between them based on a specific column, while also showing the rows that have not changed.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the csv-diff tool