view move-if-change @ 28706:29790e97da09

(perform-replace): Add parameters START and END. Use them instead of the check for a region in Transient Mark mode. (query-replace-read-args): Return two more list elements for the start and end of the region in Transient Mark mode. (query-replace, query-replace-regexp, query-replace-regexp-eval) (map-query-replace-regexp, replace-string, replace-regexp): Add optional last arguments START and END and pass them to perform-replace.
author Gerd Moellmann <gerd@gnu.org>
date Tue, 25 Apr 2000 19:19:31 +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