HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how to remove \r show by od -c ?
Operating System - HP-UX
1830899
Members
2782
Online
110017
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2002 10:23 AM
09-20-2002 10:23 AM
Hi,
I need to remove (or substitue with empty space) the the following from a file:
1. where \r occurs
2. where \n \n occurs
\r (carriage return character) and \n \n (new-line character) revealed when run 'od -c'
I tried sed 's/\r//' filea > fileb, but does not work because these are non-printable characters. How do I tell sed to remove these non-printable characters?
Thank you.
I need to remove (or substitue with empty space) the the following from a file:
1. where \r occurs
2. where \n \n occurs
\r (carriage return character) and \n \n (new-line character) revealed when run 'od -c'
I tried sed 's/\r//' filea > fileb, but does not work because these are non-printable characters. How do I tell sed to remove these non-printable characters?
Thank you.
Solved! Go to Solution.
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2002 10:30 AM
09-20-2002 10:30 AM
Solution
It sounds as though you are trying to deal with CRLF to LF termination on data that comes from a PC.
You may be able to simply use the dos2ux command like this:
dos2ux < oldile > newfile. Man dos2ux for details.
If you want to simply remove the CR's then this should work:
tr -d '\015' < oldfile >newfile
You may be able to simply use the dos2ux command like this:
dos2ux < oldile > newfile. Man dos2ux for details.
If you want to simply remove the CR's then this should work:
tr -d '\015' < oldfile >newfile
If it ain't broke, I can fix that.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP