view move-if-change @ 828:4ead1e0842f0

[xemacs-hg @ 2002-05-07 15:30:14 by stephent] error check warning <20020423105456.A1592@nemesis.ncsl.nist.gov>
author stephent
date Tue, 07 May 2002 15:30:18 +0000
parents 376386a54a3c
children
line wrap: on
line source

#!/bin/sh
if
test -r $2
then
if
cmp $1 $2 > /dev/null
then
echo $2 is unchanged
rm -f $1
else
mv -f $1 $2
fi
else
mv -f $1 $2
fi