So, we have a situation where our print queue names have changed. Pushing out the new queues and drivers is easy enough, but in the past the printers were often installed manually so the names vary from computer to computer. The queues themselves are the same though.
I found this script:
lpstat -p | cut -d' ' -f2 | grep mcx | xargs -I{} lpadmin -x {}here courtesy of sam.clark, but my scripting abilities don't go far beyond poorly cobbling things together I find on the internet. Can anyone tell me the best way to modify this, or perhaps a better option to remove a printer based on the path itself rather than the name?
Thanks in advance!