view move-if-change @ 44648:6c3a3cb75b95

* dired-aux.el (dired-star-subst-regexp, dired-quark-subst-regexp): New constants. (dired-do-shell-command, dired-shell-stuff-it): Use them. (dired-do-shell-command): Raise an error if both `*' and `?' substitution marks are used in the same command. (dired-shell-stuff-it): Substitute all instances of `*' and `?' in a command given via dired-do-shell-command.
author Francesco Potortì <pot@gnu.org>
date Wed, 17 Apr 2002 09:54:47 +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