Created
May 16, 2019 02:21
-
-
Save skuschel/2bbf8b17f3c4696faa0a7744231d684c to your computer and use it in GitHub Desktop.
CUPS remove all printers pointing to /dev/null
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 | |
# Stephan Kuschel, 2019 | |
# Works the regex grabbing the printers requires works if computer is set to german. Change sed cmd | |
# accordingly if this is not the case. | |
lpstat -s | grep null | sed 's#Gerät für \(.*\): ///dev/null#\1#' | xargs -n1 lpadmin -x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment