- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Redirecting stderr from mailx
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
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
тАО02-05-2010 07:38 AM
тАО02-05-2010 07:38 AM
when I try to just redirect stderr it just seems to ignore it...
> ll | mailx -s "Test e-mail" bert 2> mail.stderr
> bert... User unknown
<$HOME>/dead.letter... Saved message in <$HOME>/dead.letter
>
Where $HOME is the home directory of the user account that I was logged in as.
Any help would be much appreciated.
Thanks,
Gary
Solved! Go to Solution.
- Tags:
- redirect
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-05-2010 07:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-05-2010 08:02 AM
тАО02-05-2010 08:02 AM
Re: Redirecting stderr from mailx
It's been a long week! I don't know why I didn't redirect stdout as well in the first place.
As a matter of interest, why didn't my original command work?
Have a good week-end.
Thanks,
Gary
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-05-2010 08:17 AM
тАО02-05-2010 08:17 AM
Re: Redirecting stderr from mailx
> As a matter of interest, why didn't my original command work?
The output messages you really wanted to collect are going to STDOUT not STDERR.
I could have suggested you do:
# # ll | mailx -s "Test e-mail" xxx 1>>/tmp/mylog
...and ignored STDERR entirely.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-05-2010 04:40 PM
тАО02-05-2010 04:40 PM
Re: Redirecting stderr from mailx
Because your assumptions and the programmer's about what goes to stderr were different.
With an interactive program like mailx, perhaps this is blurred.
Sometimes as JRF had, you should just log both.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-08-2010 12:14 AM
тАО02-08-2010 12:14 AM