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)



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

(required)
(will not be published, required)

* Copy this password:

* Type or paste password here:






Archives

Links