This script will enhance the operation of standard UNIX commands by doing some simple checking of the command
if [ "$#" != 2 ]
then
print " Usage: copy from to"
exit 1
fi
from="$1"
to="$2"
if [ -f "$to" ]
then
print "$to already exists; overwrite (y/n)?\c"
read answer
if [ "$answer" != y ]
then
print " $from not copied "
exit 0
fi
fi
cp $from $to