- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- stripping control characters from line !!!!
Categories
Company
Local Language
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
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
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
02-22-2002 12:14 PM
02-22-2002 12:14 PM
so, you will have file such as :
line 1^M
line 2^M
For the life of me, I tried all kinds of sed commands, inside vi, such as
:1,$s/\^M//g
etc, but nothing seem to work. What kills me is that I had the same problem some 10 months ago and did it without thinking !!! I must be getting old :-(((
A search on google or looking at my vi book did not help either :-(((
Can somebody shed some light out there ???
Thanks
Henrique
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2002 12:19 PM
02-22-2002 12:19 PM
SolutionIf your copying files back and forth
from a dos box, there are two utilities
that are available for this. The first
is 'dos2ux' which is for files coming
from dos to Unix. The second is 'ux2dos'
which of course goes from unix to dos.
You could use the vi method or even sed
but why bother when you can use these.
HTH
-Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2002 12:19 PM
02-22-2002 12:19 PM
Re: stripping control characters from line !!!!
First thing, always ftp text files in ASCII mode. That way you don't have to be concerned with whether or not the files have the LF-CR in Windows and only LF (actually referred to as NL - newline) in UNIX.
If you do get a text file in UNIX from Windows that was transferred in binary mode, simply run dos2ux file >newfile
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2002 12:20 PM
02-22-2002 12:20 PM
Re: stripping control characters from line !!!!
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xe57b50011d20d6118ff40090279cd0f9,00.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2002 12:33 PM
02-22-2002 12:33 PM
Re: stripping control characters from line !!!!
:%s/^M//g
where ^ is cntl-v and M is cntl-shift-M
and tada... gone.
GL,
C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2002 12:36 PM
02-22-2002 12:36 PM
Re: stripping control characters from line !!!!
Henrique
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2002 01:00 PM
02-22-2002 01:00 PM
Re: stripping control characters from line !!!!
No comprende. No apunta para mi? Excusa mi espanol.
C