On Mar 5, 2004, at 3:49 AM, Sascha D?rdelmann wrote:

> Robert Peirce <bob / peirce-family.com> wrote:
>> I ran 'cat hello | tr -d '\r' > tst8', made tst8 executable and it 
>> ran.
>
> Have a look at the command "recode", which is availiable on most linux
> systems, see http://recode.progiciels-bpi.ca/manual/IBM-PC.html.
>
> "recode pc hello" should do for your case.

I'm running BSD on a Mac PowerBook G4.  However, Uwin (Unix for 
Windows) has the -d and -D flags to cat that can add/remove '\r'.

I suppose it would be easy to write a shell script, called recode that 
would do these things.  I already have one called rename that allows, 
for example, changing file1..file9 to file01..file09.

One of the beauties of Unix and its many variants is that it makes text 
manipulation easy.   Ruby seems to have similar, maybe even more 
powerful, capabilities in this area, which is one of the reasons I am 
trying to learn it.