Auto disk archiver #23 Version 1.0.0
KEDADAstarted="none yet"; KEDADAstoped=""; KEDADAcount="0" ; KEDADAtodo="0"; ORIG_IFS=$IFS ; IFS=$'\n' while : ; do if [ `cat /etc/mtab | grep /dev/hdc |wc -l` != 0 ] ; then clear KEDADAcount=0 ; KEDADAstart="Started archive of cdrom0: `date`" ; KEDADAtodoToT=`ls /media/cdrom0/ | wc -l ` time for x in `ls -q /media/cdrom0/` ; do clear echo -e "$KEDADAstart \n copying \"$x\" \n ( $KEDADAtodo / $KEDADAtodoToT ) \n" time cp -r /media/cdrom0/$x /mnt/mu/KEDADA/ KEDADAtodo=$((KEDADAtodo+1)) done KEDADAstoped="Compleat: `date`" echo -e "$KEDADAstoped" umount /media/cdrom0/ sleep 23 eject -v cdrom else KEDADAcount=$((KEDADAcount+23)) clear echo -e "Last Archive: $KEDADAstarted \n $KEDADAstoped\n Now in sleeping period $KEDADAcount. " sleep 23 fi IFS=$ORIG_IFS done