// install utils
# sudo apt-get install hplip sane-utils
// Detect scanner
# hp-probe
// press [enter] to detect device on usb*
#
scanimage -L
// Scan to file
#
scanimage > scan-file.pnm
# bash scanner.sh
=================================================================
#!/bin/bash
if [ ! -d `date +'%Y-%m-%d'` ]; then
mkdir `date +'%Y-%m-%d'`
fi
cd `date +'%Y-%m-%d'`
read -n1 -r -p "請按 [s] 繼續 ( 按任意鍵離開 ) ..." key
until [ "$key" != "s" ];
do
clear
echo -e "\n掃描中..."
#_ret=0
_filename="`date +'%H-%M-%S'`.pnm"
scanimage > $_filename
echo -e "存檔至 `date +'%Y-%m-%d'`/$_filename\n\n"
read -n1 -r -p "請按 [s] 繼續 ( 按任意鍵離開 ) ..." key
done
echo -e "\n程式結束\n"
=================================================================
懶惰掃描 script
Reference :
NSLU2-Linux - HowTo / UnslungScanWithHPLIP browse
Linux: Scan An Image With HP Scanners
Everything Linux - Using a Scanner Under Linux
沒有留言:
張貼留言