- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ^M won't print or display, except in vi command.
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
09-29-2000 05:05 AM
09-29-2000 05:05 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2000 05:19 AM
09-29-2000 05:19 AM
Re: ^M won't print or display, except in vi command.
It will be printing but doesn't effectively do anything on a printer which considers
You don't need the characters in UNIX, look at 'man dos2ux' which is a utility for removing them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2000 05:28 AM
09-29-2000 05:28 AM
Re: ^M won't print or display, except in vi command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2000 05:32 AM
09-29-2000 05:32 AM
Re: ^M won't print or display, except in vi command.
It's only UNIX utiliies like vi that show it up as ^M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2000 05:45 AM
09-29-2000 05:45 AM
Re: ^M won't print or display, except in vi command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2000 06:07 AM
09-29-2000 06:07 AM
Re: ^M won't print or display, except in vi command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2000 06:11 AM
09-29-2000 06:11 AM
Re: ^M won't print or display, except in vi command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2000 06:37 AM
09-29-2000 06:37 AM
Re: ^M won't print or display, except in vi command.
cat
Only sideeffect is that in this example all occurences of "!" in the file is converted to "!" but you can change "!" with whatever character you want.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2000 06:48 AM
09-29-2000 06:48 AM
Solutioncat -v
This works on any kind of file including binary. In fact, it is the preferred way to list the contents of an unknown file type. The reason is that many of the binary character sequences can reprogram the terminal (or terminal emulator)and require some sort of reset to put the terminal back to normal.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2000 06:50 AM
09-29-2000 06:50 AM
Re: ^M won't print or display, except in vi command.
First, I agree with John's comments above. A printer doesn't "print" it as a visible character; rather its a device control character only. The fact that vi shows it simply says its contained in the data stream. Windows & DOS want lines (records) delimited with the sequence CRLF (carriage-return/linefeed). UNIX wants just a newline character.
When you FTP in ASCII from a Windows/NT platform to UNIX (or conversely), the translation from CRLF to NL is done for you. When you do a BINARY FTP, no translation occurs, and you can end up with files like you saw in vi.
As for printers and terminals, the behavior, or I should say interpretation, of the CR and LF characters often depends upon dip-switch (hardware) or firmware settings. Sometimes the configuation is setup to generate a LF whenever a CR is sensed. An application that fails to take into account this configuration, and sends a line of data terminated with a CRLF will cause output to be double-spaced, for instance.
As John pointed out, the CR causes horizontal motion (to the left); the LF causes vertical motion (downwards). Neither on a terminal nor on a printer are the characters expressed visibly.
I hope this helps.
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2000 07:46 AM
09-29-2000 07:46 AM
Re: ^M won't print or display, except in vi command.
Those are control characters from text/word to binary or ascii. Just do "dos2ux badfile > goodfile". You can't print them, it only appears when displayed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2000 08:53 AM
09-29-2000 08:53 AM
Re: ^M won't print or display, except in vi command.
I did a cat -v filename | lp -d
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2000 09:22 AM
09-29-2000 09:22 AM
Re: ^M won't print or display, except in vi command.
Those are control characters from text/word to binary or ascii. Just do "dos2ux badfile > goodfile". You can't print them, it only appears when displayed.