Download Numdiff User Manual, version 4.2
Transcript
Chapter 6: Tools 28 1 $ 233.54 2 $ 850.80 3 $ 12.65 4 $ 524.00 5 $ 78.25 6 $ 432.90 7 $ 60.88 8 $ 759.00 9 $ 322.54 10 $ 230.00 11 $ 443.10 12 $ 67.65 13 $ 10.00 14 $ 201.45 ------------------------Total $ 4226.76 then the differences between file1 and file2 are given by • the insertion of the separator ------------------------- in file1 before the list of the days, • the slightly different values for the expenses related to the days 1, 2, and 3, • the insertion in file2 of the lines related to the expenses for the days 6,7,8, and 9, • the slightly different values for the expenses of the day 10, • the addition in file1 of the entry for the day 15, and • the different values for the total sum of the expenses. In this case the output of ‘sdiff file1 file2 ’ is (when using sdiff from GNU diffutils 2.8.1) file1: Day Expenses ------------------------1 $ 233.56 2 $ 850.77 3 $ 12.55 4 $ 524.00 5 $ 78.25 10 $ 230.05 11 $ 443.10 12 $ 67.65 13 $ 10.00 14 $ 201.45 15 $ 110.00 ------------------------Total $ 2761.38 | file2: | | | < | > > > > Day 1 2 3 Expenses $ 233.54 $ 850.80 $ 12.65 4 5 6 7 8 9 10 11 12 13 14 $ $ $ $ $ $ $ $ $ $ $ 524.00 78.25 432.90 60.88 759.00 322.54 230.00 443.10 67.65 10.00 201.45 < ------------------------| Total $ 4226.76 and it is easy to deduce that ndfilter will fail in resynchronizing the files. The files ‘file1.new’ and ‘file2.new’ created by ‘ndfilter file1 file2 ’ are actually (side by side view):