Convert dos linebreaks without dos2unix available
- October 18th, 2007
- No Comments
- linux
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