home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Languguage OS 2
/
Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO
/
gnu
/
perl5000.zip
/
perl5000
/
mv-if-diff
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1994-06-11
|
303 b
|
15 lines
: mv-if-diff file1 file2
: move file1 to file2 if file1 and file2 are different.
if test $# -lt 2 ; then
echo "usage: $0 file1 file2"
echo "move file1 to file2 if file1 and file2 are different."
exit 1
fi
if cmp $1 $2 >/dev/null 2>&1; then
echo "File $2 not changed."
rm -f tmp
else
mv $1 $2
fi