lp printing with bash script: how to sure the file has been printed?
hi,
i have several scripts that send files to a printer: Code:
lp -d ML-1640 "$_docN.$_c.pdf" if i'm NOT in the office, here comes panic. they call me on the phone, if i can't answer the activity gets stucked... sure, i tried and explain them how to open the right file with nautilus and print it with evince, but no way to get it done. do you know if there a way to let the script guess if the print process went fine? since it occurs rarely i can't make any test... i'd like to simply put a control like Code:
while (( $? > 0 )); do lp -d ML-1640 "$_docN.$_c.pdf"; done any suggestion? thanks |
cups has several command line utilities that can be used to check/view status of a printer queue. Check out lpstat and lpq.
|
All times are GMT -5. The time now is 08:28 PM. |