- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- script log to email body.
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
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
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
04-18-2012 06:49 AM
04-18-2012 06:49 AM
I have a process that will mail out a log via a command: "mail -s "Log" myemailaddress@domain.tld </tmp/move.sh.log"
It is odd behavior, some work and others do not,
the "log" is parsed into the body of the email.
It is baffling. any ideas from the script gurus would be appreciated.. rm
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2012 10:50 AM - edited 04-18-2012 06:20 PM
04-18-2012 10:50 AM - edited 04-18-2012 06:20 PM
Re: script log to email body.
ASCII files are different between Windows and Unix systems. Unix systems use just a linefeed at the end of each line but Windows (and their relatives like Outlook, etc) requires carriage return and linefeed together in order to look 'norma'l. Actually, normal is very non-standard. Wordpad and Word can read Unix style files with no problem as the single LF is taken as a soft line break. However, Notepad and other Window utilities will treat the bare LF character (without LF) as no-action character Notepad shows the LF as a black square.
Here is a blog that will help:
http://blog.sourcedirect.com/?s=email+attachment
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2012 02:53 PM
04-18-2012 02:53 PM
SolutionIn addition to what Bill says, some versions of Outlook also have an option to the LF as a line break and that will help you read the message.
Or you could use ux2dos:
ux2dos /tmp/move.sh.log | mailx -s "Log" myemailaddress@domain.tld
>now the log is attached as an ATT00001..bin file
I'm not sure why it is attached, nobody complains about that for my messages. ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2012 01:59 PM
05-01-2012 01:59 PM
Re: script log to email body.
Thanks Bill,
I should have prefaced the email a bit, the fact is I was migrating from fedora 7 to a VM of Fedora 14. the behavior was the same script from my FC7 box. I've back burner the project as we are migrating to a full blown microsoft environment.. Have a learning curve in front of me. :-o
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2012 02:02 PM
05-01-2012 02:02 PM
Re: script log to email body.
thanks Dennis for the reply. I took my scripts back to original FC 7 box. no problems now. Kind of pointless to migrate if we will be migrated scripting to Microsoft SSIS in 6 months or a year..