[vox-tech] Changing data with awk
vox-tech at lists.lugod.org
vox-tech@lists.lugod.org
Sat Jun 5 14:29:14 PDT 2004
> Yes, "\n" terminates a record. But Richard (the original poster) said
> that the field has embedded "carriage return" characters, which is "\r".
> Since "\r" is not "\n", the codes do work... at least under *NIX.
>
> Yes, pressing the "Enter" key produces carriage return code on a standard
> keyboard (ASCII 13 "\r"), but *NIX translates it to the linefeed code
> (ASCII 10 "\n"), whereas DOS/Windows translates it to carriage return
> followed by linefeed "\r\n", and the older MacOS (before 10) doesn't
> translate it at all. And by convention "\n" under C (along with various
> other languages) represents the default line terminator for that platform
> ("\n" for *NIX, "\r\n" for DOS/Windows, "\r" under older MacOS.) But
> unlike DOS/Windows, UNIX Lets you turn off the translation using termios.
> But now we're off topic... -_-v
>
> -Mark
Thanks Mark, I wasn't aware of those subtleties.
But, I'm betting Richard has embedded ASCII 10s in his file, and that
is why SQLLoader (Oracle's mass data loading tool, which uses ASCII 10s
as it's record separator) is giving him problems.
Richard, wha'chu'got in your file?
Jay
More information about the vox-tech
mailing list