Thanks Grant

looking through the Solaris Printer's Standard Interface Program, I saw a variable 
which talks about what to do if there is a bad file.  It lists a variable called 
${files} which I grabbed. So I wasn't far wrong with $file, it turns out to be $files, 
though it only works for printing a single file.
Postscript files now don't get printed properly.

FILTER="/bin/cat /etc/lp/fd/pclcode.txt $files | lp -s -d dc451-r"

I am wondering if there would be a way to do this without double-spooling though.

Chris

On Thu, 17 Jan 2002 07:44:33 +1100 (EST)
"Grant Parnell" <[EMAIL PROTECTED]> wrote:

> On Wed, 16 Jan 2002, Christopher Booth wrote:
> 
> > Hi guys
> > 
> > I'm trying to set something up for work here that will output to our Fuji Xerox 
>printers on Solaris 2.6
> > 
> > Basically it involves double spooling, as per instructions here below
> > 
> > Here are the steps:
> > 
> > Step 1. On the server, set up the filter device
> > 
> > $ lpadmin -p dc451 -v /dev/null -i /usr/lib/lp/model/standard
> >         $ enable dc451
> >         $ accept dc451
> > 
> > Step 2. Edit the newly created interface script (/etc/lp/interfaces/dc451)
> > 
> > * Look for the case statement that starts case $TERM in
> > 
> > * For the * ) condition, comment out the line that refers to FILTER=${LPCAT}
> > 
> > * Insert the line FILTER="/bin/unix2dos | lp -s -d dc451-r"
> > 
> > Step 3. Set up the network printer (no1316p-r)
> > 
> > $ lpadmin -p dc451-r -o protocol=bsd,dest=dc451 -v /dev/null \
> >         -i /usr/lib/lp/model/netstandard
> >         $ enable dc451-r
> >         $ accept dc451-r
> > 
> > 
> > $ lpshut ; /usr/lib/lpsched
> > 
> > Note: Without specifying the -T or -I options, the defaults "unknown" and "any" 
>are used.
> > 
> > This works fine, but creates more overhead for the printer albeit not much.
> > In the attached file pclcode.txt is the escape codes for telling the printer to 
>print text as PCL, I would like to use this option instead.
> > FILTER="/bin/cat /etc/lp/fd/pclcode.txt $file | lp -s -d dc451-r"
> > 
> > My question is 
> > What variable do I need to put to make the lp output be the $file
> > listed above so it gets the code included as a header ?
> 
> 
> Just a hunch, try '-' as in
> FILTER="/bin/cat /etc/lp/fd/pclcode.txt - | lp -s -d dc451-r"
> 
> Usually this implies standard input rather than a file. Failing that try 
> this one
> 
> FILTER="/bin/cat >/tmp/$$.filter; /bin/cat /etc/lp/fd/pclcode.txt 
> /tmp/$$.filter | lp -s -d dc451-r; rm /tmp/$$.filter"
> 
> -- 
> ---<GRiP>--- 
> Web: www.arcadia.au.com/gripz 
> Phone/fax: 02 4950 1194   
> Mobile: 0408 686 201
-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to