0 Members and 1 Guest are viewing this topic.
Thanks. Diff is used in a complex Bash script that needs to check if two files are equal or not, and in case not it needs to report differences. My script allocates the output of Diff in a variable to have it ready.
if ! cmp $FILE1 $FILE2 ; then echo '***' $FILE1 differs from $FILE2 '***' diff $FILE1 $FILE2 exit 1fi