i want to do a script that return me the status (disable or enable only) of my printers.
when i do "lpstat -p" i have:
printer th55_307 is idle. enabled since Apr 2 12:16
fence priority : 0
printer dj55_25 disabled since Jun 21 14:12 -
c'est pour essayer
fence priority : 0
when it is enable, enable is the 5th word and when it is disble it the 3rd.
if i use "grep able" it returns me the entire line whereas i want only disable or enable.
when i do "lpstat -p" i have:
printer th55_307 is idle. enabled since Apr 2 12:16
fence priority : 0
printer dj55_25 disabled since Jun 21 14:12 -
c'est pour essayer
fence priority : 0
when it is enable, enable is the 5th word and when it is disble it the 3rd.
if i use "grep able" it returns me the entire line whereas i want only disable or enable.