We have an ancient Business Basic application which prints reports to a simple line printer, and we would like to capture that output to a file (to then scrape the data from it). This runs on Red Hat 8 (circa 2002).
The Basic code OPENs then PRINTs to "LP", which makes its way to lpd printer lp. Inspecting a couple of random spool files that didn't get deleted in /var/spool/lpd/lp/, these look to have suitable content.
So the question is, how to temporarily change something such that the Basic program sends its output only to a file (and that file doesn't get printed).
One could achieve the effect by changing the Basic code, but the system is extensive, has many places where printing is performed, and there would be no easy way to offer an option at those places.
Hence the pursuit of a way to do this, external to the Basic application, which can be instated and uninstated (to return printing to normal) from a script.
In case it's relevant, the printcap entry:
lp:\
:ml#0:\
:mx#0:\
:sd=/var/spool/lpd/lp:\
:af=/var/spool/lpd/lp/lp.acct:\
:sh:\
:rm=[ip address]:\
:rp=pr0:\
:lpd_bounce=true:\
:if=/usr/share/printconf/util/mf_wrapper:
Thanks!
Asked by gwideman
(125 rep)
Aug 19, 2016, 10:10 PM
Last activity: Sep 22, 2016, 02:22 AM
Last activity: Sep 22, 2016, 02:22 AM