# DOS fc - not the ksh built-in!

typeset arg cmd pre first second
cmd=diff
arg=
for i in "$@"
do case $i in
	/[Bb])	cmd=cmp;;
	/[Cc])	pre="$pre | tr '[a-z]' '[A-Z]'";;
	/[Ww])	pre="$pre | tr -s ' 	' '  '";;
	/[1-9][0-9]*)	;;
	*)	arg="$arg $i"
		second="$first"
		first="$i";;
   esac
done
if test "$cmd" = cmp -o "$pre" = ""
then	_Ducmd $cmd $arg
else	
	eval cat $second $pre >/tmp/$LOGNAME$$
	eval cat $first $pre | diff /tmp/$LOGNAME$$ -
	rm /tmp/$LOGNAME$$
fi
