view move-if-change @ 53112:b6c073b1f1c7

(Ffile_attributes): Parameter ID-FORMAT added and included in call to file name handler. Numeric UID and GID optionally translated to strings. Docstring updated. (directory_files_internal): Parameter ID-FORMAT added. (Fdirectory_files_and_attributes): Parameter ID-FORMAT added and included in call to file name handler and call to directory_files_internal. Docstring updated. (Fdirectory_files): Dummy parameter added in call to directory_files_internal.
author Lars Hansen <larsh@soem.dk>
date Fri, 21 Nov 2003 18:27:51 +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