Hey,
I am running a linux shell script containing some php. I want to be able to do a DIFF on two files...if the files are identical, set an exit status of 0, and if they are different, set an exit status of 1.
I have been looking long and hard on how to do this, but I don't think that I can with DIFF. Does anyone know of any alternatives? Or anyway I can achieve this?
Here is how I am doing the DIFF:
$reg_test = "diff -s FILE_A FILE_B";
exec("$reg_test");