Diffing two tables

To diff specific columns of two .csv files, using miller CLI tool and process substitution <() $ colordiff -u <(mlr --icsv --opprint cut -f 'id,avg_sourcing_spread' then format-values -f '%.4lf' then put '$avg_sourcing_spread=round($avg_sourcing_spread*100.0)' service.csv) <(mlr --icsv --opprint cut -f 'id,sourcing_spread' then format-values -f '%.4lf' then put '$sourcing_spread=round($sourcing_spread*10000.0)' superset.csv) We can also use the spreadsheet to diff two tables: highlight the first table select the conditional formatting tool add the rule A1<>Sheet2!A1 In LibreOffice Calc there is a specific tool to compare tables....

August 10, 2022 · Fernando Costa Bertoldi

Diff long lines

TIL: To compare long lines with diff, break each of them in multiple lines https://www.johndcook.com/blog/2021/04/22/moby-diff/ $ diff -u <(fold -s -w 20 temp1.txt) <(fold -s -w 20 temp2.txt)

August 9, 2022 · Fernando Costa Bertoldi