view move-if-change @ 103418:1df3381b5a57

(Setting up a customization file): Grammar fix. Customize is no longer "new". (Displaying the current line or column): Line-number mode is on by default. Don't mention `column' package. Mention linum.el. (Turning on abbrevs by default): Explain how to do it for buffers, modes, and everywhere. (Associating modes with files): Use add-to-list. Don't mention Emacs 19. (Highlighting a region): On by default since 23.1. (Replacing highlighted text): Update doc quote. (Working with unprintable characters): Don't mention search-quote-char. (Using an already running Emacs process): Gnuclient is probably not an enhancement these days. (Indenting switch statements): Remove mention of pre-Emacs 20. (Horizontal scrolling): Abbreviate Emacs 20 description. (Replacing text across multiple files): Fix name of dired command. (Disabling backups): Use require not load.
author Glenn Morris <rgm@gnu.org>
date Sat, 13 Jun 2009 20:32: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