Code:
/bin/rm -f mycron
crontab -l | grep -v "transferring to a system" | grep -v "Auto deletion of transmitted objects" | grep -v "Dealing with not importable" > mycron
fixpart="/etc/usr/transfer_script # transferring to a system"
echo "Specify the frequency in minutes - "
echo "every 1, 2, 3, or 5 minutes (default every 1 minute) "
echo $nn "Frequency [1|2|3|5] ? [1]:" $cc
read ans
case $ans in
2) echo "1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59 * * * *" $fixpart >> mycron
break ;;
3) echo "1,4,7,10,13,16,19,22,25,28,31,34,37,40,43,46,49,52,55,58 * * * *" $fixpart >> mycron
break ;;
5) echo "1,6,11,16,21,26,31,36,41,46,51,56 * * * *" $fixpart >> mycron
break ;;
*) echo "* * * * *" $fixpart >> mycron;;
esac