#!/bin/sh -u # compare two files in an IF statement, checking the return status of DIFF # Reference: Chapter 11 # -IAN! idallen@ncf.ca if diff /etc/group /etc/passwd >/dev/null ; then echo "the files are the same" date else # this uses a command substitution to capture the date output today=$( date ) echo "the files are different on $today" fi