All Linux HowTo's

Tired of waiting, have the results emailed to you

Share This:

Some commands take longer to complete than your willing to wait. In times like this you can have the results emailed to you with this very simple trick. Here’s a basic example:

echo "apples" | mail -s "test" -

The above would send the email right away with the word “apples” in it. But if the command was something more time consuming such as searching for a string within a bunch of files, you might do this:

grep -i "needle" * -R | mail -s "test" -

And then go have a drink and wait for the email.

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *