- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Strange code in file
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
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
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
тАО09-05-2006 07:28 PM
тАО09-05-2006 07:28 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2006 07:36 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2006 07:36 PM
тАО09-05-2006 07:36 PM
Re: Strange code in file
the control M is a sign of different interpretation of line termination, between Win and UNIX.
See:
http://forums1.itrc.hp.com/service/forums/bizsupport/questionanswer.do?threadId=1014542
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2006 08:38 PM
тАО09-05-2006 08:38 PM
Re: Strange code in file
except use dos2ux , how to remove it in the file ? thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2006 09:07 PM
тАО09-05-2006 09:07 PM
Re: Strange code in file
you can simply erase it!
It is seen as one letter.
But better is dos2ux.
HTH
Volkmar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2006 10:23 PM
тАО09-05-2006 10:23 PM
Re: Strange code in file
In lieu of 'dos2ux' you can use:
# perl -pi.old -e 's/\r\n/\n/;s/\032//' file
This eliminates not only the carriage-return (^M) but also an end-of-file "^Z" charcters found in Windows (DOS) files.
A backup copy of your 'file' will be made as 'file.old'. When done, 'file' will have been "repaired".
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-06-2006 08:21 PM
тАО09-06-2006 08:21 PM
Re: Strange code in file
in Vi just type:
:%s/^M//g
to obtain ^M type ctrl-V ctrl-M
HTH,
Art
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-06-2006 08:45 PM
тАО09-06-2006 08:45 PM
Re: Strange code in file
With sed.
sed 's/^M$//g' < your_file
# in bash/tcsh, press Ctrl-V then Ctrl-M
Also keep this links handy , with one-liners
for sed. Quite nice
http://www.student.northpark.edu/pemente/sed/sed1line.txt