Mail Archives: djgpp/2001/05/22/10:55:28
> Date: Tue, 22 May 2001 08:41:13 -0500
> From: JT Williams <jeffw AT darwin DOT sfbr DOT org>
>
> % echo foo > bar
> % od -c < bar
> 0000000 f o o \r \n
> 0000005
So? Is this a problem? This is how it's supposed to work: this is
DOS/Windows, not Unix; text files by default have DOS CR-LF EOLs.
> Also (and this is *really* annoying), >> redirection will
> introduce \r\n delimited lines even if the file original
> was pure \n delimited.
Also expected: >> doesn't read the file, so it cannot do anything that
depends on the original file's contents. It has been like that since
day one.
> Can this be changed?
Not dynamically. You could force Bash to use Unix EOL format all the
time (this still requires changes to Bash, but these changes are not
very complicated), but I suspect that this will do more trouble than
it solves, since many DOS/Windows programs cannot grok such files
gracefully.
> If the user has bash loaded, then the user probably wants the Unixy
> behavior anyway.
I think you are wrong. The user wants Unixy _power_, but not Unixy
files.
- Raw text -