Re: tr problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Saturday 14 June 2008, Cameron Simpson wrote:
>On 13Jun2008 22:42, Gene Heskett <[email protected]> wrote:
>| Before this gets too far off the track, I wanted to replace the single $0D
>| with a single $0A.  And yes, I'm aware that dos used both characters,
>| which I hate to admit is the actual right way to do it.
>You're right to hate it, because it is the wrong way to do it.
>Using two characters as a line delimiter is mad, because it introduces
>parsing ambiguity (what should a bare \r or \n mean? What about \n\r?
>The two character delimiter is a holdover from naively coded systems that
>wanted to dump text files direct to printers without any translation, so a
>carriage return and a line feed were needed to manipulate the printer head.
>Which is just daft in a data storage format.
>That the IETF internet text protocols use CR+NL as line delimiters is
>a compatibility thing, not a recommendation.
>A line _should_ be terminated by a single character. What that character
>is is a somewhat arbitrary choice, given that the ASCII table doesn't
>have an end-of-line (EOL) character, just CR and LF and ASCII was what
>was there the play with. UNIX went with NL, OS/9 and Macs went with CR,
>and DOS went with "I'm too dumb to translate text delimiters into
>printer control actions", thus its CR/NL overspeak.
Maybe, but back then there was a lot of attempted lockin to store branded 
printers by selling the one that talked to the computers they were selling with 
a minimum of hassle & making it difficult to reconfigure them to your machine 
of choice.  Radio shack was extremely guilty of that.

Getting OT for a bit..

I have an old Xerox Diablo 1650-ro printer, the fastest daisy wheel ever made at 
40 cps.  It also didn't have any jumpers to tell it to do a line feed, it did 
what you told it literally at an input speed of 1200 baud.  In this case it was 
easy enough for the printer driver to add the linefeed with an option setting 
in the devices descriptor file.  Woe be to the person who sat one of those on a 
std printer stand of the day without adding a sheet of 1/4" plywood across the 
back & screwed in place, nails would fall out.  If not reinforced against the 
hip check the stand took every time the head did a cr, it would all be on the 
floor in less than a box of tractor feed.  A great printer in its day, but 
today the film ribbons are so brittle with old age they are broken on the first 
character strike.  I can buy a fresh Brother Laser at Staples for less than a 
case of ribbons for for the Xerox, so I did. I now pipe that machines text only 
output to this one at 9600 baud, run it through cups which doesn't seem to care 
about the EOL char used, and send it back to the Brother sitting on that 
machines desk, all thanks to usb extension cables and ser-usb adapters.  And 
its 20 some PPM out of the Brother.  Whats not to like?

>Cameron Simpson <[email protected]> DoD#743
>Microsoft: Where do you want to go today?
>UNIX:      Been there, done that!

Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
It's only by NOT taking the human race seriously that I retain
what fragments of my once considerable mental powers I still possess.
		-- Roger Noe

fedora-list mailing list
[email protected]
To unsubscribe:

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux