man test: STRING1 = STRING2 the strings are equal STRING1 != STRING2 the strings are not equal Ha mindenképp diffet szeretnél használni, akkor az valahogy így lenne: if ! $(diff $file1 $file2 > /dev/null); then echo 1 else echo 2 fi