#514893 cmp: please allow comparing multiple files

Package:
diffutils
Source:
diffutils
Description:
File comparison utilities
Submitter:
Michael Stransky
Date:
2011-10-24 10:09:39 UTC
Severity:
wishlist
#514893#5
Date:
2009-02-11 18:26:52 UTC
From:
To:
It would be great if cmp could handle more then 2 files.
cmp -c file1 file2 file3 would output for example:
(byte file1 file2 file3)
1 100 101 102
2 100 100 101
7 100 101 102
cmp: EOF on file2.
9 100     102
cmp: EOF on file3.

#514893#16
Date:
2011-10-16 15:55:26 UTC
From:
To:
Hello.

A long time ago, I received this from the Debian bug system.

[ I realize that this is unlikely to be implemented, but I am supposed
to forward upstream bugs upstream in either case ].

Thanks.

Package: diff
Version: 2.8.1-11
Severity: wishlist


It would be great if cmp could handle more then 2 files.
cmp -c file1 file2 file3 would output for example:
(byte file1 file2 file3)
1 100 101 102
2 100 100 101
7 100 101 102
cmp: EOF on file2.
9 100     102
cmp: EOF on file3.

#514893#19
Date:
2011-10-16 15:55:26 UTC
From:
To:
Hello.

A long time ago, I received this from the Debian bug system.

[ I realize that this is unlikely to be implemented, but I am supposed
to forward upstream bugs upstream in either case ].

Thanks.

Package: diff
Version: 2.8.1-11
Severity: wishlist


It would be great if cmp could handle more then 2 files.
cmp -c file1 file2 file3 would output for example:
(byte file1 file2 file3)
1 100 101 102
2 100 100 101
7 100 101 102
cmp: EOF on file2.
9 100     102
cmp: EOF on file3.

#514893#24
Date:
2011-10-24 09:58:35 UTC
From:
To:
Santiago Vila wrote:

Thanks for forwarding that.
However, I'll bet you can do something similar with od and a program
that can show differences in 3 files.  Here's how you can come close
using only two inputs with sdiff:

    $ f() { od -Anone -w1 -v -tc "$@"; }
    $ sdiff -w14 <(printf 'a\x06\xff\n'|f) <(printf 'a\x05\xff\n'|f)
       a       a
     006  |  005
     377     377
      \n      \n
    [Exit 1]