#!/bin/sh -u # Compare two files in an IF statement, checking the return status of DIFF. # We don't want the usual output of DIFF on the screen, so we throw it away. # All we are interested in is the exit status of DIFF, not the output. # -IAN! idallen@idallen.ca if diff /etc/group /etc/passwd >/dev/null ; then echo "the files are the same" else echo "the files are different" fi