view move-if-change @ 949:7a35465d73bc

[xemacs-hg @ 2002-08-02 15:15:42 by youngs] 2002-08-03 Brian A Palmer <bpalmer@rescomp.Stanford.EDU> * fns.c (Fsplit_string_by_char): Make 2nd arg SEPCHAR a required argument.
author youngs
date Fri, 02 Aug 2002 15:15:47 +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