\r characters in the file

hi

I copied a file to unix box from windows.
When i run this file it throws error on every command written in that file.

The reason is that the file contains some \r charecters that came into picture while copying the file.
This could be viewed by using od -c command.

My question is that is there any command in unix or any way by which this special \r charecters be removed?

Thanks.

You can use the conversion utility dos2unix. An alternative is:

tr -d '\015' < dosfile > unixfile

Thanks for the help

That worked.

Cheers