Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Removal of ^M at end of record...

Posted on 2003-03-10
Medium Priority
Last Modified: 2013-12-26
I have AIX on my servers and dos2unix is not available on AIX.  How do I get rid of ^M at the end of a record?  I also tried :%s/^M/ and it tells me: ex: 0602-007 The pattern does not exist.
What can I use to get rid of the ^M if the client doesn't know to send me the file in ASCII format?
EX:  "01-Mar-2002","1667","234","IN","744","744","1",,"0.995","-0.005",,"ALL","13-Sta

Question by:JGreenwood
LVL 21

Accepted Solution

tfewster earned 200 total points
ID: 8104727
^M is a single character - reproduce it by pressing Control-V then Control-M in your command

e.g. sed s/^M// file > newfile

Author Comment

ID: 8105219
that worked, thanks!!!

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…
Suggested Courses
Course of the Month10 days, 16 hours left to enroll

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question