view move-if-change @ 659:f1a615a0d9e0

[xemacs-hg @ 2001-09-10 19:31:41 by andyp] oops
author andyp
date Mon, 10 Sep 2001 19:31:41 +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