/usr/lib/printfilters/grab-ppd.awk is in printfilters-ppd 2.13-11.1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | #!/usr/bin/awk -f
# set up field and record separators to bring up printcap entries split
# appropriately
BEGIN {
FS = ":\\\\[^:graph:]+:";
RS = "[^\\\\]\n";
gar="sd=" spool "[:\\n]";
};
# There's a better way to do this, but it works.
# blank? all comment? Ditch it
/^[^:graph:]*[#$]/ { next }
# find the printer whose spooldir was specified and print the ppdfile to stdout
$0 ~ gar {
for(i=1; i<=NF; i++) {
if($i ~ /^ppdfile=/) {
split($i, a, "=");
print a[2];
}
}
}
|