Home > Tips > Redirect Output to Email

Redirect Output to Email

November 4, 2004 Posted by KP

If you prefer to reading long document or output on Windows, output redirect does this job well, for example,
# mysqladmin variables | mail yourname@domain.com

But I don’t know why the following command doesn’t work, only got an empty message.
# man crontab | mail yourname@domain.com
(Update: please read comments for explanation)

Bookmark and Share


Related Posts:

Filed Under: Tips

2 Comments to “Redirect Output to Email”

  1. Mike Says:

    It did not work because nothing was sent by the ‘man’ program to “standard out”. The pipe mail command (”blah | mail user@example.com“) will work for any programs that terminate immediately without input from the user. In your case, the program ‘man’ requires user input to scroll down in the manual and also to quit.

  2. Linux Newbie Says:

    Many thanks, Mike, now I got it, cheers!

Leave a Comment









*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word




Categories

Archives

Meta