From: Bill Kelly Date: 2004-06-11T02:30:58+09:00 Subject: Re: strip DOS ^Ms? From: "Kaspar Schiess" > > | I generally strip DOS idiocy on the command line with: > | > | tr -d '\r' < in > out > > Why would a thing grown from history be called idiocy in any context ? > It just is that way. If MS-DOS had come out in the 1950's it might be forgivable. In 1981 elegant solutions to DOS' stupidities had existed for at least a decade... And yet DOS debuts with: - lack of shell globbing (STILL doesn't) - shell can't escape its own metacharacters (STILL can't) - ^Z character terminating text files even though this was a historical artifact from an OS that needed them because its filesize was measured in blocks... POINTLESS when your OS knows the exact file size in bytes, which MS-DOS always has - ignorance of "a file is a bag of bytes, and everything is a file" metaphor - TWO end of line characters for text files when one would do (in 1981 we had CRT screens not teletypes) - special illegal filenames "nul" "com1" "lpt1" etc. - no piping of program output/input streams (they finally grafted this on haphazardly) - can't unlink an open file and continue to read from it (this is why ruby -i doesn't work for in-place edits in DOS) It's "idiocy" because better solutions already existed for a decade... Yes I've been using MS-DOS since 1981... :( The history of MS-DOS is the very embodiment and manifestation of the cute turn of phrase, Those who do not understand Unix are condemned to reinvent it, poorly. -- Henry Spencer ..Sadness. > If we change that, we would to have agree on one > line ending for everyone. Doesn't Mac have the same issues but the other > way round ? At least the old macs just used a single character for newline, even if it was CR instead of LF... :) Regards, BILLKE~1.TXT