view move-if-change @ 45593:996be238a122

(grep-tree-command, grep-tree-files-aliases) (grep-tree-ignore-CVS-directories, grep-tree-ignore-case): New custom variables. (grep-compute-defaults): Compute grep-tree-command's default value. (grep-expand-command-macros): New aux function. (grep-tree-last-regexp, grep-tree-last-files): New aux variables. (grep-tree): New command like grep-find but extended prompting.
author Kim F. Storm <storm@cua.dk>
date Thu, 30 May 2002 22:11:29 +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