Productive Linux


 Subscribe via Feedburner in a reader

Enter your email address:

Delivered by FeedBurner


Don't have an account?
Sign up to
Forgot your password?

Email program output and data
16 June 2008 @ 11:32 BST
by Paul

Say you have an output of a program and need to email it. It is easy to pipe it to the mail command. Take for example this:

cat file.txt | mail

This sends the contents of file.txt to I find this far quicker than firing up Thunderbird and then copying and pasting the text in from an editor. This technique really comes into its own when you want to email the out of the program. For example, say you're developing something on one system and want to email the changes you've made to a colleague:

svk diff | mail my@colleague

This takes the changes you've made in the local repository and emails them to your colleague. This is quick and easy and something I'll be doing a lot more of in the future.

Comments disabled