I am using xzcmp to compare several XZ files. But I have a strange problem: For some files (*), xzcmp doesn't work and returns exit code 2, without error message.zxcmp version1.sql.xz version2.sql.xz echo $?    <-- 2I can't explain why these files are special, since both files can be normally extracted using xz .xz -dc version1.sql.xz > version1.sqlxz -dc version2.sql.xz > version2.sqlcmp version1.sql version2.sqlecho $?    <-- 1. works!I have debugged /usr/bin/xzcmp and found out, that following command is executed, and returns exit status 141 :      elif # Reject Solaris 8's buggy /bin/bash 2.03.          echo X | (echo X | eval $cmp /dev/fd/5 - >/dev/null 2>&1) 5<&0; then        xz_status=$(          exec 4>&1          ($xz1 -cdfq -- $1 4>&-; echo $? >&4) 3>&- |            ( ($xz2 -cdfq -- $2 4>&-; echo $? >&4) 3>&- 5<&- </dev/null |            eval $cmp /dev/fd/5 - >&3) 5<&0        )To be honest, I don't undersand this code, and I can't find out why it works for most files, and doesn't work for other files.I am using Debian 8.I have tried something else though:cmp <( xz -dc version1.sql.xz )  <( xz -dc version2.sql.xz )echo $?    <-- 1. works!This solution works, too. But this simple variant has the big problem that errors in the execution of xz will not be noticed...Every hint is highly appreciated.(*) I am sorry that Some files do not work is not informative. All files are SQL dumps, and were all compressed using xz with compression level 3. There are nearly no similarities between files that work and files that do not work.
xzcmp does not work for some files. (Internal pipe error 141?)
bash;debian;compression;xz