view move-if-change @ 99447:2e290d0d21c9

(Dired): Mention C-x C-d too. (Dired Enter): Document M-n in the Dired minibuffer. (Dired Navigation): Explain dired-goto-file more clearly. Document dired-isearch-filenames. (Dired Deletion): Remove unnecessary "expunged" terminology. (Flagging Many Files): & is now rebound to `% &'. (Shell Commands in Dired): Document dired-do-async-shell-command. Clarify how multi-file arguments are passed. (Misc Dired Features): Document dired-do-isearch.
author Chong Yidong <cyd@stupidchicken.com>
date Fri, 07 Nov 2008 19:02:36 +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