view move-if-change @ 92755:0ff1aa5b228e

* TUTORIAL, TUTORIAL.fr, TUTORIAL.ro, TUTORIAL.bg, TUTORIAL.it: * TUTORIAL.ru, TUTORIAL.cn, TUTORIAL.ja, TUTORIAL.sk: * TUTORIAL.cs, TUTORIAL.ko, TUTORIAL.sl, TUTORIAL.de: * TUTORIAL.nl, TUTORIAL.sv, TUTORIAL.eo, TUTORIAL.pl, TUTORIAL.th: * TUTORIAL.es, TUTORIAL.pt_BR: Remove discussion of flow control.
author Chong Yidong <cyd@stupidchicken.com>
date Wed, 12 Mar 2008 13:39:52 +0000
parents 354e0c45cedf
children 14a97ab281d5
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