printing with a shell script as a filter

printing with a shell script as a filter

Post by Jonathan B. Leffer » Sat, 20 Mar 1999 04:00:00



So I'm trying to add a printer to my Solaris x86 2.6 box.  Basically,
I'd like to create a printer that uses a shell script as a filter (in
the BSD sense of the /etc/printcap word).  Although, we don't have
/etc/printcap on 2.6.  So, how can I do this.

Yes, I'm trying to add postscript support for an hp printer.  Yes,
I've read the ubiquitously referenced html file on this.  No, I
couldn't get it to work.

Jonathan

 
 
 

printing with a shell script as a filter

Post by Casper H.S. Dik - Network Security Engine » Sat, 20 Mar 1999 04:00:00


[[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]]


Quote:>So I'm trying to add a printer to my Solaris x86 2.6 box.  Basically,
>I'd like to create a printer that uses a shell script as a filter (in
>the BSD sense of the /etc/printcap word).  Although, we don't have
>/etc/printcap on 2.6.  So, how can I do this.
>Yes, I'm trying to add postscript support for an hp printer.  Yes,
>I've read the ubiquitously referenced html file on this.  No, I
>couldn't get it to work.

The 2.6 LP system has inherited the more flexible SV print filters.
Basically, you define a printer with type "PCL" and the define a filter
that converts postscript to PCL using lpfilter.

The solaris FAQ says:

3.11) How can I print to a non-Postscript/non-ascii printer?

    The cheapest way to do this is using a printer setup based on
    Ghostscript. <http://www.cs.wisc.edu/~ghost/index.html>

    When installing Ghostscript, make sure that it supports your
    printer *and* make sure that you include support for your
    specific printer in Ghostscript.

    Then go to "Setting up a GS printer under Solaris",
            <http://cfauvcs5.harvard.edu/SetGSprinter4Solaris.html>
    and follow the instructions there.

    --- end of excerpt from the FAQ

Questions marked with a * or + have been changed or added since
the FAQ was last posted

The most recently posted version of the FAQ is available from
<http://www.wins.uva.nl/pub/solaris/solaris2/>
--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

 
 
 

1. handling SIGINT in shell scripts when executing another shell script.

I have a simple shell script foo1.sh that invokes another shell script
foo2.sh, something like below:

#!/bin/sh
SIGINT_handler()
{
  echo "## [$DATE_TIME]  User interrupt ignored,"
  continue
trap SIGINT_handler 2

...
./foo2.sh
...

----------
while executing foo1.sh, if the script receives SIGINT, how do I ignore
the SIGINT in foo2.sh ? somehow foo2.sh does not finish to completion
and is killed after receiving SIGINT. but foo1.sh is still executing.
Is there any way to trap this signal in the child script. ? Please
share your thots and inputs on this topic.
Regards,
Vikram Shekhar

2. ANNOUNCE: GNUPLOT 3.2 uploaded to sunsite.unc.edu

3. shell script being called by filter

4. vm_fault during pre-installation

5. Q: How can I have a shell script call another shell script...

6. Please HELP: IP-MASQ question

7. shell script filters for lpr to append cr

8. Sparc LX

9. (Filtering || Shell script) question

10. Shell script invoking other shell scripts

11. Ghost Script & print filters - HELP!!

12. Convert Bash shell script to Korn shell script

13. Using ELM filter and shell script as mail server