How to setup filters with CUSP printing

danesh d.qureshi at mdx.ac.uk
Tue Jul 18 07:53:19 PDT 2006


Hello Mike,

Your shell script worked beautifully.
Only one little problem is that the first line is indented see exmaple below:-

      this is a test print
this is a test print
this is a test print
this is a test print

Anyway to get round the identation on the first line?
The rest of the lines format correctly.

Dan..

> danesh wrote:
> > I wish to resolve a problem whereby the output of my ASCII file is printing as step.
> >
> > I wish to create a filter using shell script that will allow me to put a carriage return at the end of each line.
> > How would I setup a filter on RedHat Linux AS 4.
>
> The following simple filter will do the trick:
>
>      "textonly.sh":
>
>      #!/bin/sh
>      #
>      # Interface script for printing text to any printer.
>      #
>      # This is a standard System V interface script; the arguments are
>      # as follows:
>      #
>      #     printer job user title copies options filename
>      #
>
>      # Parse options...
>      copies=$4
>
>      # Send the print file...
>      copy=1
>      while test $copy -le $copies; do
>              awk '{print $0 "\r"}' < $6
>              echo "\014\c"
>
>              copy=`expr $copy + 1`
>      done
>
>      # Done!
>      exit 0
>
> To use it, run the lpadmin command with the "-i" option:
>
>      lpadmin -p printername -E -v device-uri -i textonly.sh
>
> --
> ______________________________________________________________________
> Michael Sweet, Easy Software Products           mike at easysw dot com
> Internet Printing and Document Software          http://www.easysw.com





More information about the cups mailing list