I'm trying to cancel a print job in Linux from within an interface script, but I'm not having much luck. My aim is to move the job to another printer by "lp"ing the job to another device, then cancel the primary print job. Here is my modest script:
countme=$(grep -c saj $filename)
#echo $countme $filename > /testit/done.txt if [ $countme -gt 0 ] then
# echo "it does not contain Saj" > /testit/done.txt
The logic appears to work but I can't cancel the original print request. Is it because the job is too far down the road of printing? Or is it a user permission thing?Your advice would be appreciated. I'm using Red Hat Linux and CUPS.
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!