IBM Support

How do I Remove the Carriage Returns from Text File Lines on UNIX?

Question & Answer


Question

You transfer a text file from a DOS system to a UNIX system. The end of each line contains a carriage return, which appears in a text editor as "^M". How do you remove these characters?

[{"Product":{"code":"SSGU8G","label":"Informix Servers"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Not Applicable","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF027","label":"Solaris"}],"Version":"11.1;11.5;11.7","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

More support for:
Informix Servers

Software version:
11.1, 11.5, 11.7

Operating system(s):
AIX, HP-UX, Solaris

Document number:
162671

Modified date:
03 June 2021

UID

swg21503666

Manage My Notification Subscriptions