Re: tr problem

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

 



On 13Jun2008 22:42, Gene Heskett <gene.heskett@xxxxxxxxxxx> 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?
etc).

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.

Cheers,
-- 
Cameron Simpson <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/

Microsoft: Where do you want to go today?
UNIX:      Been there, done that!

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux