view move-if-change @ 37661:6d7c89c79996

Set the property `eshell-no-numeric-conversions' on the following functions (which all deal with filesystem entities, and never Lisp numerical values): eshell/cd, eshell/pushd, eshell/popd, eshell/ls, eshell/source, eshell/., eshell/man, eshell/rm, eshell/mkdir, eshell/rmdir, eshell/mv, eshell/cp, eshell/ln, eshell/cat, eshell/make, eshell/diff, eshell/locate, eshell/occur, eshell/which, eshell/addpath.
author John Wiegley <johnw@newartisans.com>
date Thu, 10 May 2001 03:47:24 +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