i have several scripts that send files to a printer:
lp -d ML-1640 "$_docN.$_c.pdf"
sometimes (very rare, but it happens) something goes wrong, and the gnome print status wiewer reports an error. if i'm in the office, i just click ok, pick the right file and print it again "manually".
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
while (( $? > 0 )); do lp -d ML-1640 "$_docN.$_c.pdf"; done
but i'm pretty sure it won't work...