Archive for the ‘linux’ Category

cat filename | tr -d "\r"> filename.new ; mv filename.new filename

Sometimes its useful to send a small reminder, note or even a whole file from the commandline in linux. This is how it goes.

To send just a simple message type:

echo "e-mail body" | mail -s "e-mail subject" mail@example.com

If you want to send a file type:

echo "e-mail body" | mail -a /full/path/to/file -s "e-mail subject" mail@example.com
vision22.net

Copyright © 2007