- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: mailx text files lost CR-Character
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
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
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-20-2005 12:36 AM
тАО09-20-2005 12:36 AM
mailx text files lost CR-Character
I create a text file with tail -20 /var/adm/syslog/syslog.log > textfile. If i look in the file is evething ok, text appears as on the screen.
If I send it with mailx (pg textfile > mailx ...), the text appears in the mail of only one line, without Carriage Returns ! Also not easy to read it. I's the same with more > mailx.
Any idea ?
Thank you.
Thierry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2005 12:39 AM
тАО09-20-2005 12:39 AM
Re: mailx text files lost CR-Character
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2005 12:39 AM
тАО09-20-2005 12:39 AM
Re: mailx text files lost CR-Character
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2005 12:41 AM
тАО09-20-2005 12:41 AM
Re: mailx text files lost CR-Character
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2005 12:42 AM
тАО09-20-2005 12:42 AM
Re: mailx text files lost CR-Character
dos2ux file > dosfile
ps dosfile > mailx
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2005 12:44 AM
тАО09-20-2005 12:44 AM
Re: mailx text files lost CR-Character
If you are moving a file from UNIX to Windows, you need to replace newline (LF) characters as line-delimiters with carriage-return (CR) + newline (LF) ones.
On HP-UX you have:
'ux2dos' and 'dos2ux'
See the manpage for 'ux2dos'.
The first adds the CR. The second strips it out.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2005 01:04 AM
тАО09-20-2005 01:04 AM
Re: mailx text files lost CR-Character
It was not better with ux2dos/dos2ux, but ...
i found an option in ... Outlook. In extras > Options > Email options > remove extra line breaks (or something else, i have an german MS Office version).
Now it's good.
Thank you for your help.
Thierry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2005 01:06 AM
тАО09-20-2005 01:06 AM
Re: mailx text files lost CR-Character
dos2ux should help, otherwise You could uuencode the text.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2005 06:04 AM
тАО09-20-2005 06:04 AM
Re: mailx text files lost CR-Character
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2005 01:05 AM
тАО09-21-2005 01:05 AM
Re: mailx text files lost CR-Character
On my HP-UX server:
ux2dos originalfile >newfile
uuencode newfile |mailx -s "Newfile you wanted" -r myaddress@mydomain myaddress@mydomain
The ux2dos adds the exta carriage retrun needed for DOS/Windows ASCII (you'll see this as a "^M" at the end of every line if you vi the file in HP-UX.
The uuencode prevents it from being parsed by the mailer - just goes in as an attachment to the mail.
mailx options:
-s Specifies the subject
-r Specifies the return address the recipient will see (otherwise if you do it as root they'll see return as root@hostname.domain)