view move-if-change @ 3516:e43d0da85762

[xemacs-hg @ 2006-07-19 15:04:46 by stephent] Improve description and eg of editing keystrokes. Thx M C Wescott. <87u05d63vk.fsf@tleepslib.sk.tsukuba.ac.jp>
author stephent
date Wed, 19 Jul 2006 15:04:52 +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