Last active
May 27, 2016 21:43
-
-
Save alicraigmile/1463bf55510766995de18f08fb0c958f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Scan to PDFs using my Epson Stylus XS125 | |
# Usage: in .bashrc, source scanner.sh | |
find_scanner () { | |
scanimage -L -d epson2 | sed -e "s/device \`//" -e "s/'.*//" | |
} | |
scan () { | |
echo "Scanning USB bus for scanners..." | |
SCANNER=$(find_scanner) | |
echo "Starting gscan2pdf with '$(echo $SCANNER)'..." | |
gscan2pdf --device="$(echo $SCANNER)" | |
echo "gscan2pdf closed down. Bye." | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment