batch scanning
Leave a Comment so far
Leave a comment
As vezes é necessário copiar uma quantidade bizarra de arquivos, uma maneira simples de colocar em batch esta tarefa.
1 #!/bin/bash 2 3 device="hpaio:/usb/Photosmart_C3100_series?serial=BR73NGQ13X04KV"; 4 5 while true; 6 7 do if [[ -a stop_file ]]; 8 then break ; 9 fi; 10 11 echo "scanning" ; 12 name=`date +%s` ; 13 scanimage -d $device -p >$name.pnm; 14 15 convert $name.pnm $name.jpg; 16 rm $name.pnm; 17 18 echo "sleeping" ; 19 sleep 10s; 20 21 do if [[ -a stop_file ]]; 22 then break ; 23 fi; 24 25 done
Leave a Comment
Leave a Comment so far
Leave a comment