Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete carriage return ^M in a record

Status
Not open for further replies.

hello99hello

Programmer
Jul 29, 2004
50
0
0
CA
Hello All,

I have a file, inputfile, containing the following records:

200095,,,3/6/2003,OTHER^M,3.75,,,3.75
200095,,,5/2/2003,VACATION^M,3.75,,,3.75
200095,,,6/2/2003,VACATION^M,15,,,15

I was wondering if there is script that I could use to take out the carriage return ^M from each record so that my outputfile would be like:

200095,,,3/6/2003,OTHER,3.75,,,3.75
200095,,,5/2/2003,VACATION,3.75,,,3.75
200095,,,6/2/2003,VACATION,15,,,15

Thankx for your help.
 
This question has been asked (and answered) many times before.
Do a search for 'carriage return' in this forum.
 
If dos2unix is available on your system, use it. That's what it's for!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top