[Thread Prev][Thread Next][Index]

Re: [ferret_users] RE: Help in reading ascii data in ferret



Sudheer,

> I just checked below modification and it did the job
>
> cat "tzclim.dat" |tr '\r' '\n'

That's right!  You know, the name "tr" stands for "translate" or
"translation" or some such thing.  So, that is the original
functionality of tr.

By the way, that sounds like the original text file came from a Mac.
For your information, the notion of newline is expressed differently
on different systems:

Unix: \n
Mac: \r  (traditionally)
MS-DOS/Windows:  \r\n

(But, I'm not sure what the Mac does these days.  The text files I
create with emacs on my Mac laptop uses '\n'.)

We normally don't realize this problem because many applications can
handle all these different formats and because newline translations
are often automatically done, as when you attach text files to your
email messages, for example.

Cheers,
Ryo


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement