[Thread Prev][Thread Next][Index]

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



Thank you Ryo,
                                This file had ^M and there was no new line character after each number so(in vi it looked like horizontal text), so in this case the tr command should also add a new line character where it replaces the ^M , there may be a way to do this with tr which I am not sure .


with best regards,
Sudheer

On Tue, Dec 4, 2012 at 5:51 AM, Ryo Furue <furue@xxxxxxxxxx> wrote:
Hi Sudheer and Ferret users,

On Mon, Dec 3, 2012 at 3:33 PM, Sudheer Joseph <sjo.india@xxxxxxxxx> wrote:
It looks like your data has ^M and other windows formatting embedded in it

I sometimes face the same problem.  The easiest way to fix such a datafile (on a Unix or Linux machine) is probably

$ cat originalfile.txt | tr -d '\r' > fixedfile.txt

'tr -d' deletes the specified character from the input and '\r' denotes "carriage return", meaning control-M (^M).

If your system has a "dos2unix" command, that does the same thing.

Regards,
Ryo




--
with best regards

Sudheer

**********************************************************************************
Dr. Sudheer Joseph                                                                
Scientist                                                                         
INDIAN NATIONAL CENTRE FOR OCEAN INFORMATION SERVICES (INCOIS)
MINISTRY OF EARTH SCIENCES, GOVERNMENT OF INDIA
"OCEAN VALLEY" PRAGATHI NAGAR (BO)
OPP.JNTU, NIZAMPET SO
Andhra Pradesh, India. PIN- 500 090.
TEl:+91-40-23044600(R),Tel:+91-9440832534(Mobile)
Tel:+91-40-23886047(O),Fax:+91-40-23892910(O)
E-mail: sudheer.joseph@xxxxxxxxx;  sjo@xxxxxxxxxxxxx.
Web- http://oppamthadathil.tripod.com
           --------------* ---------------
"The ultimate measure of a man is
not where he stands in moments of
comfort and convenience, but where
he stands at times of challenge and
controversy."
                        Martin Luther King, Jr.
"What we have done for ourselves alone dies with us.
What we have done for others and the world remains and is immortal."
- Albert Pines

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

Privacy Policy | Disclaimer | Accessibility Statement