Use tee command to send output to a file and email

Email this to someoneShare on Google+Share on FacebookTweet about this on TwitterShare on LinkedIn


You would like to send the error output from a command or a script to both an error file and an email.


By using tee, you could do the following: