Re: Printing Ascii files via lpr
From: Edgar Allen (eallen_at_allenhome.kc.rr.com)
Date: 08/03/03
- Next message: Heiner Steven: "Top 10 posters comp.unix.admin"
- Previous message: Umberto Quaia: "Re: What is wrong with this crontab?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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>
- Next message: Heiner Steven: "Top 10 posters comp.unix.admin"
- Previous message: Umberto Quaia: "Re: What is wrong with this crontab?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|