Difference between revisions of "Pipe to identify CUPS printers"
From VistApedia
m |
|||
Line 1: | Line 1: | ||
− | Here is a code snippet that uses the pipe device to query Linux for the names of available CUPS printers. It returns them in | + | Here is a code snippet that uses the pipe device to query Linux for the names of available CUPS printers. It returns them in a MUMPS array. |
lpstat(DEVICE) ;; | lpstat(DEVICE) ;; |
Revision as of 13:16, 15 August 2009
Here is a code snippet that uses the pipe device to query Linux for the names of available CUPS printers. It returns them in a MUMPS array.
lpstat(DEVICE) ;;
;; (CUPS has been configured with ;; the desired printers defined.) ;;Sample run: ;; GTM>d lpstat^testing(.jlz) ;; GTM>zwr ;; jlz="" ;; jlz("HP_LaserJet_1100A")="" ;; jlz("Photosmart_192.168.5.103")="" ;; New P Set P="pipe" Open P:(command="lpstat -a")::P For Use P Read DEVICE Quit:$ZEOF Do . Set DEVICE($P(DEVICE," "))="" . Quit Close P Quit