view move-if-change @ 45862:1bcf7f390ca2

Remove unnecessary prev/next/up pointers in @node commands. (Top): Don't include it in DVI output. (History): Explain $- and $+. (Built-ins): New node. Document `cd'.
author Kai Großjohann <kgrossjo@eu.uu.net>
date Mon, 17 Jun 2002 11:50:12 +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