[MacTUG] Parsing Plists

Dani Roloson daroloso at mfcf.math.uwaterloo.ca
Wed Jan 19 10:52:07 EST 2011


So I've determined where the "printcap" is and that PlistBuddy is slightly
better than "defaults read" but I want to pull out just the
"device-uri" and "printer-make-and-model" from the Array of Dict's

/usr/libexec/PlistBuddy -c Print /Library/Preferences/org.cups.printers.plist

Piping it into "fgrep -e device-uri -e printer-make-and-model" works
but is there something that pulls out specific fields from more complex plists.
(Property List Editor doesn't seem to be the answer either.)

Dani


More information about the MacTUG mailing list