Unix Command line - Printer Details
- 
 Specifically, I'd want to try to find the highlighted information here even though this is just a sample printer.  
- 
 If you do an lpstat -t, does the info every appear in the output? 
- 
 @scottalanmiller said in Unix Command line - Printer Details: If you do an lpstat -t, does the info every appear in the output? I get detail, but not the driver name. So no. 
- 
 For anyone reading this in the future, the challenge is we've replaced a printer with a newer model, I can successfully check to see if the new driver is installed and I can list what printers are installed. What I can't do is verify that the new printer is actually the new printer with the updated driver. (At this point it's just a matter of trusting that I didn't goof up) So I could hoof it around the office and check workstations and see if the new printer is actually the new printer with the new driver. But I REALLY don't want to do that. . 
- 
 @DustinB3403 said in Unix Command line - Printer Details: lpstat lpoptions -p PrinterName | grep 'printer-make-and-model='
- 
 @black3dynamite said in Unix Command line - Printer Details: @DustinB3403 said in Unix Command line - Printer Details: lpstat lpoptions -p PrinterName | grep 'printer-make-and-model='That works! now just to filter down just the piece I want to see as I get a wall of text. 
- 
 @DustinB3403 said in Unix Command line - Printer Details: @black3dynamite said in Unix Command line - Printer Details: @DustinB3403 said in Unix Command line - Printer Details: lpstat lpoptions -p PrinterName | grep 'printer-make-and-model='That works! now just to filter down just the piece I want to see as I get a wall of text. Using awkshould work.
- 
 Here is the completed command. lpoptions -p <NAME> | grep -o "printer-make-and-model='Your Printer make and Model"That outputs the exact detail I needed! 
- 
 @DustinB3403 said in Unix Command line - Printer Details: Here is the completed command. lpoptions -p <NAME> | grep -o "printer-make-and-model='Your Printer make and Model"That outputs the exact detail I needed! lpoptions -p SHCSL_209_ColorPrinter | sed -r "s/^.*(printer-make-and-model.*)'.*$/\1/g; s/'//g; s/printer-make-and-model=//g"This will remove all the unnecessary text, printer-make-and-model=, and the single quotes. 
- 
 @black3dynamite said in Unix Command line - Printer Details: @DustinB3403 said in Unix Command line - Printer Details: Here is the completed command. lpoptions -p <NAME> | grep -o "printer-make-and-model='Your Printer make and Model"That outputs the exact detail I needed! lpoptions -p SHCSL_209_ColorPrinter | sed -r "s/^.*(printer-make-and-model.*)'.*$/\1/g; s/'//g; s/printer-make-and-model=//g"This will remove all the unnecessary text, printer-make-and-model=, and the single quotes. Yeah I'm also able to just use lpoptions -p SHCSL_209_ColorPrinter | grep "'SHCSL_209_ColorPrinter'"and get what I need in a single line response.


