×
Create a new article
Write your page title here:
We currently have 3,189 articles on s23. Type your article name above or create one of the articles listed here!



    s23
    3,189Articles

    23 lines of code/KEDADA

    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
    
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.

    Recent changes

  • BruderSpektrum • 3 months ago
  • BruderSpektrum • 3 months ago
  • BruderSpektrum • 3 months ago
  • BruderSpektrum • 3 months ago
  • Cookies help us deliver our services. By using our services, you agree to our use of cookies.