view move-if-change @ 40756:4c885d1ac450

* ls-lisp.el (ls-lisp-time-to-seconds): New function. (ls-lisp-format-time): Emulate GNU fileutils 4.1.1 ls, whose time stamps always line up by default. Also, it uses a slightly different window to determine whether files are "recent".
author Paul Eggert <eggert@twinsun.com>
date Tue, 06 Nov 2001 02:00: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