1. Andy Mikhailenko
  2. scripts

Source

scripts / scan.sh

1
2
3
4
5
6
7
8
#!/bin/sh

# prefix is the first argument or "scan" if none
if [ $1 ]; then PREFIX="$1"; else PREFIX="scan"; fi
FILENAME="$PREFIX-`date +'%Y-%m-%d_%H-%M-%S'`.jpg"

scanimage | convert - $FILENAME
echo Saved as $FILENAME