Re: Printing Ascii files via lpr

From: Edgar Allen (eallen_at_allenhome.kc.rr.com)
Date: 08/03/03


Date: Sun, 03 Aug 2003 03:02:06 GMT


<html><input type crash></html>
begin B'ichela wrote:
> In article <beg1ec$4o5r6$1@ID-134476.news.dfncis.de>, davehinz@spamcop.net wrote:
>> Yup, I think what you want is "pr". Lets you do portrait, landscape,
>> specify columnts, font size, headers, line numbering, and I would
>> suspect pagination as you mention.
> I use pr quite often, and to my knowledge, there is no way to
> easily use it to print all of the odd pages, flip the paper around to
> print all of the evens.
> Looking at the gnu pr (thats the one with Slackware 8.0 linux
> here) the option:
> +FIRST_PAGE[:LAST_PAGE],
> --pages=FIRST_PAGE[:LAST_PAGE]
>
> begin [stop] printing with page FIRST_[LAST_]PAGE
> Looks like I would have to do something like this
> pr +1:1 myfile | lpr
> second page:
> pr +p3:3 myfile| lpr
> could I use a .sh script via a counting to count from 1-480 in odd
> numbers and feed that to pr? like this
> pr +$page:$page myfile | lpr
>
>
Since I know you have Linux I suggest:

    for pg in $(seq 1 2 480)
    do
        pr +${pg}:${pg} myfile >>/tmp/odds
    done
    lpr /tmp/odds

Reload paper...

    for pg in $(seq 2 2 480)
    do
        pr +${pg}:${pg} myfile >>/tmp/evens
    done
    lpr /tmp/evens

Does not seem that hard and would be more efficient than
spooling all those pages individually.

Sending 'pr' across your file 480 times might take longer than
the ghostscript method though.

-- 
"As long as they are going to steal it, we want them to steal ours. They'll get
sort of addicted, and then we'll somehow figure out how to collect sometime in
the next decade." -- Bill Gates, explaining how Microsoft views software piracy
<http://news.com.com/2100-1023-212942.html?legacy=cnet>


Relevant Pages

  • Re: Word Styles - Change ALL at once?
    ... When you first start a document, and create modify a style to add numbering ... (eg number the built-in heading styles), then the font of the number is ... the font of the underlying paragraph. ...
    (microsoft.public.word.pagelayout)
  • Re: Auto numbering
    ... > Specify how to start or restart page numbering ... > section formatting elements, such as the margins, page orientation, headers ... > and footers, ... > toolbar (toolbar: A bar with buttons and options that you use to carry out ...
    (microsoft.public.office.misc)
  • Re: Auto numbering
    ... Control the things you can and Don't Worry about the things you can't ... >> Specify how to start or restart page numbering ... >> and footers, ... >> headers and footers.) ...
    (microsoft.public.office.misc)
  • Re: Auto numbering
    ... those to create a larger document still using page numbering. ... >>> and footers, ... >>> headers and footers.) ... >>> which you set certain page formatting options. ...
    (microsoft.public.office.misc)
  • Re: Different formats for same heading level
    ... the formatting of the outline number should follow. ... Outline Number, Customise to change the font, it then associates that ... numbering rules for the old style. ... font settings for the new style so that it doesn't screw up either the ...
    (microsoft.public.word.docmanagement)

Quantcast