Files
oldlinux-files/gnu/gcc/gcc-2.2.2/move-if-change
2024-02-19 00:24:47 -05:00

16 lines
129 B
Bash
Executable File

#!/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