- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- control characters
Categories
Company
Local Language
Forums
Discussions
- Integrity Servers
- Server Clustering
- HPE NonStop Compute
- HPE Apollo Systems
- High Performance Computing
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Knowledge Base
Forums
Discussions
- Cloud Mentoring and Education
- Software - General
- HPE OneView
- HPE Ezmeral Software platform
- HPE OpsRamp Software
Knowledge Base
Discussions
Forums
Discussions
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
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- 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
08-26-2004 08:48 AM
08-26-2004 08:48 AM
I am formating a scriptfile created from script command as it is having few unwanted charcters like ^M, ^H ...I just dont want these charcters. Can I do this using vi..Please suggest.
Thanks
Prashant
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2004 08:51 AM
08-26-2004 08:51 AM
Re: control characters
cat
The /015 is octal for the ^M character.
Another option is the dos2unix command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2004 08:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2004 08:57 PM
08-26-2004 08:57 PM
Re: control characters
If you do want to remove the characters while you are editing the file in vi, then enter:
:1,$ s/^V^M//
Where ^V is control-V and ^M is control-M; this will remove all the ^M chars. Control-V escapes the next character and lets you enter it without it having its normal effect. The ^V won't display in the command on the screen.
To remove all the ^H chars:
:1,$ s/^V^H//g
(the 'g' is needed as there could be more than one ^H on a line)
Andrew
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2004 10:25 PM
08-26-2004 10:25 PM
Re: control characters
try this
cat filename |col -bx >filename1
this will remove the junk characters.
regds,