view move-if-change @ 102616:25d094256b42

(Basic Completion): Note that read-file-name-completion-ignore-case and read-buffer-completion-ignore-case can override completion-ignore-case. (Minibuffer Completion): Document completing-read changes. (Completion Commands): Avoid mentioning partial completion mode. Document minibuffer-completion-confirm changes, and minibuffer-confirm-exit-commands. (High-Level Completion): Document new require-match behavior for read-buffer. Document read-buffer-completion-ignore-case. (Reading File Names): Document new require-match behavior for read-file-name.
author Chong Yidong <cyd@stupidchicken.com>
date Tue, 17 Mar 2009 04:54:14 +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