1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16:
#!/bin/ksh if [ $# -ne 1 ] then echo "Usage $0 [filename]" exit 1 fi FILE=$1 if [ ! -f $FILE ] then echo "$FILE does not exist" exit 1 fi cp $FILE ${FILE%_*}