view move-if-change @ 1215:03de778cac14

[xemacs-hg @ 2003-01-15 15:17:01 by gin] about golubev <024f3e22e36506-gin@mo.msk.ru>
author gin
date Wed, 15 Jan 2003 15:17:02 +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