Google 网上论坛不再支持新的 Usenet 帖子或订阅项。历史内容仍可供查看。

How the #$%&^* can I filter lpr/lpd output on SCO OS5?

已查看 1 次
跳至第一个未读帖子

Michael Sweeden

未读,
2000年12月14日 12:09:152000/12/14
收件人
I have a client I am migrating to an SCO OpenServer 5.0.6 system on
Saturday. I have set up lpr/lpd printing to several print servers on the
network, and would like to to a couple of simple things to the output in
some instances, like insert a trailing formfeed, and CR-CRNL mapping. I
found you can supposedly add an "of=filtername" to the /etc/printcap to
use a filter, so I tried creating one (though I can find nothing in the
documentation on creating one to do these things), and the filter does
not appear to be executed. A TA on the SCO support site says that the
"of=filtername" indeed does not work, that it has been reported to SCO
engineering, and that there is no current workaround. What a bummer!

I wanted to see in anybody has been in this situation and found a
creative solution to the problem. One idea I thought of overnight is
that I could create a printer connected to /dev/null that formats the
output as needed and then spools the job to the lpr/lpd printer. Anybody
have any other ideas? And, a simpler way to do crnl mapping than the one
I found: sed -e "s/$/`echo \"\015\"`/g" < source > destination?
Thanks!


Tony Lawrence

未读,
2000年12月14日 18:28:362000/12/14
收件人
Michael Sweeden wrote:
>
> I have a client I am migrating to an SCO OpenServer 5.0.6 system on
> Saturday. I have set up lpr/lpd printing to several print servers on the
> network, and would like to to a couple of simple things to the output in
> some instances, like insert a trailing formfeed, and CR-CRNL mapping. I
> found you can supposedly add an "of=filtername" to the /etc/printcap to
> use a filter, so I tried creating one (though I can find nothing in the
> documentation on creating one to do these things), and the filter does
> not appear to be executed. A TA on the SCO support site says that the
> "of=filtername" indeed does not work, that it has been reported to SCO
> engineering, and that there is no current workaround. What a bummer!

There was some recent mention of a fix, but the idea of sending
through a virtual printer works well and is (IMHO) much more
flexible.

>
> I wanted to see in anybody has been in this situation and found a
> creative solution to the problem. One idea I thought of overnight is
> that I could create a printer connected to /dev/null that formats the
> output as needed and then spools the job to the lpr/lpd printer. Anybody
> have any other ideas? And, a simpler way to do crnl mapping than the one
> I found: sed -e "s/$/`echo \"\015\"`/g" < source > destination?


/usr/lib/lponlcr


--
Tony Lawrence (to...@aplawrence.com)
SCO/Linux articles, help, book reviews, tests,
job listings and more : http://www.pcunix.com

0 个新帖子