view move-if-change @ 2459:4c1db13742bc

[xemacs-hg @ 2004-12-29 05:08:26 by ben] Commit FAQ xemacs-faq.texi: Major rearrangement. Expand to 10 sections. Add various questions, mostly stubs currently. Remove some obsolete stuff. Update a bunch of the links
author ben
date Wed, 29 Dec 2004 05:08:26 +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