[Thread Prev][Thread Next][Index]

Re: [ferret_users] ERROR: command syntax?



Hi Ferret users and dos2unix fans,

Jaison mentioned dos2unix, and if it's not available, you can
(almost) always use

   tr -d '\r' < infile > outfile

on your Unix/Linux machine to convert a Windows text file to
a Unix one.  If you are unfortunate enough to have an ancient
version of the tr command, you would use

   tr -d '\015' < infile > outfile

instead(*).

Another (stupid) trick is to send your script as an attachment to an
email message!  When you attach your Ferret script, you'll probably
have to change its extension to ".txt".

Regards,
Ryo
---------------
The tr command translates characters, but a "-d" option means
to delete, rather than to translate, the specified character.
In our case, we want to remove "carriage return" characters
from the Windows text file.  A carriage return is sometimes
represented as "^M" (on your screen), "\r" (sed, tr, Perl, Ruby,
etc.), "\015" (likewise), and "0x0d" (C language).


[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement