SUMMARY: Printcap and input filters (if:)

From: Smith, Lawrie <Lawrie.Smith_at_capita.co.uk>
Date: Thu, 24 Jan 2002 09:33:31 +0000

Many thanks to Alan Davis, the answer arrived in my intray before my mail
asking the question!!
I knew this list was good but telepathic prescience as well?!?

Question:
        Does anyone know how I can capture what gets passed to the 'if' file
defined in printcap?
        eg. if:/usr/lbin/hplaserof:\
        Can I replace the /usr/lbin/hplaserof string with something else to
redirect what ever is passed to a text file?

Answer:
Here's how I've done it in the past :
 
/etc/printcap entry :
 
test|Test entry:\
:if=/local/bin/test_lp_filter.ksh:\
:sd=/usr/spool/testlp:\
:lf=/usr/adm/lperr:\
:lp=/dev/null:
 
Script executed as input filter :
 
#!/bin/ksh
cat >/tmp/test.prn

I have changed test.prn to test.$$ so I can save multiple test results

Kind regards

Lawrie Smith
Capita Technical Services
West Malling

email: lawrie.smith_at_capita.co.uk
Tel: 01732 877266
Received on Thu Jan 24 2002 - 09:32:41 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:43 NZDT