Created
December 24, 2010 15:36
-
-
Save rbochet/754343 to your computer and use it in GitHub Desktop.
Shell script for printer cron
This file contains 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 | |
# Romain Bochet | |
# Use as a cron | |
# Print all the files included in a folder with lp, and move them into another folder. | |
# Use absolute path (mandatory for crons) | |
SOURCE="/home/dropbox/print/" | |
DONE="/home/romain/printed/" | |
for FILE in `ls $SOURCE` | |
do | |
/usr/bin/lp $FILE | |
/bin/mv "$SOURCE$FILE" $DONE | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment