> From [EMAIL PROTECTED] Thu Feb  7 07:15:01 2002
> Date: Thu, 7 Feb 2002 06:26:11 -0800 (PST)
> From: J M <[EMAIL PROTECTED]>
> Subject: LPRng: How can I edit a file to be printed
> To: [EMAIL PROTECTED]
>
> I have a file that for whatever reason add four blank
> lines to the 
> top of the document to be printed.  I have tried all I
> can and am 
> having to resort other things.  How can I delete the
> first four lines 
> from the top of file to be printed?
>
> The file is sent from an OpenVMS system to Linux
> RedHat 7.2.  I use 
> LPRng and lpd to sent it via samba smbclient to a
> Windows 98 
> machine.  I looked at /usr/libexec/filters/smbprint
> and tried a 
> sed '1d' <&2, but it didn't delete a line, and in
> fact, never printed 
> at all.  Thank you.
>
> The reason I need to delete the four blank lines at
> the top is 
> because it causes the report that normally prints on
> one page to 
> print on two.  If there are multiple pages in the
> report, it will 
> print out a page, have a page with a few lines for
> that page, and 
> then start another full page, and so on.  I never had
> this problem with smbclient on hp-ux (I had other more
> aggravating ones).

You might want to try the following for smbprint.  You need to use
sed -e '1,4d' to delete the lines.

#!/bin/sh
...
up to the smbclient command

(
  # comment out the /bin/cat command
   sed -e 1,4d  # remove the first four lines
) | smbclient
  (and the rest of the 

Patrick Powell                 Astart Technologies,
[EMAIL PROTECTED]            9475 Chesapeake Drive, Suite D,
Network and System             San Diego, CA 92123
  Consulting                   858-874-6543 FAX 858-279-8424 
LPRng - Print Spooler (http://www.lprng.com)

-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address

If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:                           | example:
subscribe LIST <mailaddr>       |  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr>     |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------

Reply via email to