If this isn't exactly what you wanted, please try our Search (there's a LOT of techy and non-techy stuff here about Linux, Unix, Mac OS X and just computers in general!):
From: Bela Lubkin <belal@caldera.com>
Subject: Re: xtod vs: lponlcr
Date: Wed, 27 Nov 2002 18:11:37 GMT
References: <m18H6GV-0002PKC@cactus.com>
Jeff Hyman wrote:
> I have a customer that is having a stair-stepping output issue
> to the printer. I am not new to this problem and even have a FAQ
> on the topic. My question has to do with command '/usr/lib/lponlcr'
> which I am not familar with. I have no 'man' pages on this command.
> I am most interested in finding out how it compares to what 'xtod' does...
> if they are even comparable commands.
>
> # lp -dprinter_name ascii_file
> # cat ascii_file | lp -dprinter_name
> # cat ascii_file | xtod | lp -dprinter_name
> # cat ascii_file | /usr/lib/lponlcr | lp -dprinter_name
`xtod` and `lponlcr` are very similar. xtod's source is more
complicated because it responds to the name you run it under (xtod or
dtox). lponlcr is _really_ simple. Aside from a ridiculous copyright
statement about how holy and confidential this stuff is, it's just:
#include <stdio.h>
main()
{
register int c;
while ((c=getchar()) != EOF) {
if (c == '\n')
putchar('\r');
putchar(c);
}
}
xtod also: takes an optional single filename to read from instead of
stdin; and appends a control-Z (DOS EOF marker) to the end of the
output.
I believe DOS Merge comes with another set of these utilities, and VP/ix
probably did, and quite a number of utilities have an embedded ability
to do CRLF translation along with something else they're doing (e.g.
`ftp`). It's a very frequent problem for Unix users, so the wheel has
been reinvented many times.
>Bela<
Enter your email address for automatic notification of new posts here
(be sure to whitelist 'feedburner.com' if you use spam filtering)
| Views for this page | ||||
|---|---|---|---|---|
| Today | This Week | This Month | This Year | Overall |
| 2 | 2 | 19 | 378 | 1,357 |
/Bofcusm/1810.html copyright 1997-2004 Bela Lubkin All Rights Reserved
Have you tried Searching this site?
Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Add your comments