Ask a Question related to Linux / Unix Administration, Design and Development.
-
B'ichela #1
Printing Ascii files via lpr
Is there a utility that takes an ascii text file. prints all
of the odd pages on one side of paper, in this case via a dot matrix
printer. and I flip the paper over to print the other sides? I don't
want to use a2ps. as ghostscript is slow on my IBM proprinter XE. Thus
I want to print it in the native fonts of the printer. There is some
utilities for MSDOS for this, Anything for Unix or Linux?
--
A tagline from Comp.os.Linux.Advocacy:
(I keep hearing RTFM, but I'm not sure where TFM is).
From the Desk of the Sysop of:
Planet Maca's Opus, a Free open BBS system.
Telephone 860-738-7176 300-33.6kbps
[url]Telnet://pinkrose.rivernet.cc[/url]. Open 24/7!
The New Cnews maintainer
B'ichela
B'ichela Guest
-
Printing PDF files
Is there any tag or custom tag that will cause a pdf file to print???? -
ID CS not printing placed .eps files
Greetings all; ID CS, Windows 2000 I have converted a Quirk 4 document into ID CS and have reworked the document besides. The page is quite... -
Printing to .ps files
Suddenly, nobody in our office can print to a .ps file from ID 2. After 90 minutes of panicked troubleshooting, I found that if I attempt to print... -
Printing ASCII to Hex
Hi, There must be an easier way to convert a basic ascii string to hex. I tried using ord/chr/unpack/sprintf(%x) combinations and just dug my... -
To count a number of lines in C++ or Java or ASCII files by exluding white spaces and comments
Hi all, We have huge files in Java and C++ and I need to count the total number of lines in each of them by excluding white spaces (from the... -
davehinz@spamcop.net #2
Re: Printing Ascii files via lpr
Someone who looks an awful lot like B'ichela <mdalene@pinkrose.net.dhis.org> wrote:
Yup, I think what you want is "pr". Lets you do portrait, landscape,> Is there a utility that takes an ascii text file. prints all
> of the odd pages on one side of paper, in this case via a dot matrix
> printer. and I flip the paper over to print the other sides? I don't
> want to use a2ps. as ghostscript is slow on my IBM proprinter XE. Thus
> I want to print it in the native fonts of the printer. There is some
> utilities for MSDOS for this, Anything for Unix or Linux?
specify columnts, font size, headers, line numbering, and I would
suspect pagination as you mention.
A quick check of my systems shows it's there on a Linux box, a
FreeBSD box, a Solaris 8 (Solaris 2.8, SunOS 5.8, whatever you want
to call it) box, and, er, that's all I checked. But, looks like you
can find it on SysV and/or BSD-ish systems. Makes nice looking output,
should do what you're after.
Hope this helps,
Dave Hinz
davehinz@spamcop.net Guest
-
Chuck Dillon #3
Re: Printing Ascii files via lpr
B'ichela wrote:
Not that I'm aware of but you can roll one pretty easily using csplit> Is there a utility that takes an ascii text file. prints all
> of the odd pages on one side of paper, in this case via a dot matrix
> printer. and I flip the paper over to print the other sides? I don't
> want to use a2ps. as ghostscript is slow on my IBM proprinter XE. Thus
> I want to print it in the native fonts of the printer. There is some
> utilities for MSDOS for this, Anything for Unix or Linux?
>
or pr | csplit. Use csplit to burst the output into one page per file
then cat the pages to the printer in the desired order.
-- ced
--
Chuck Dillon
Senior Software Engineer
NimbleGen Systems Inc.
Chuck Dillon Guest
-
Edgar Allen #4
Re: Printing Ascii files via lpr
<html><input type crash></html>
begin B'ichela wrote:Since I know you have Linux I suggest:> In article <beg1ec$4o5r6$1@ID-134476.news.dfncis.de>, [email]davehinz@spamcop.net[/email] wrote:> I use pr quite often, and to my knowledge, there is no way to>> 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.
> 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
>
>
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>
Edgar Allen Guest



Reply With Quote

