HMBR


batch scanning
April 21, 2008, 4:03 pm
Filed under: nerd, open source

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
Advertisements

1 Comment so far
Leave a comment

On our website you will find reviews submitted by our customers http://free-comment.com

Comment by KennethDart




Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s



%d bloggers like this: