weblog d’un abbe

20060123

New mail signature

Filed under: Personal — Tags: — abbe @ 1103

I was fed up with a same signature (actually quote) all the time. So I’ve created a shell script which will give up new quote everytime it is executed. It uses fortune and sed. I’m using this script as my email signature in Evolution. You can use it and customize it accordingly.

#!/bin/bash

#Make it executable: chmod +x ./mailsign

#This script requires some hacking because Evolution exepcts signatures
#in HTML whether mail is text or not. So, if mail is in text format, the
#formatted text of signature is taken without HTML tags.
#So to have any kind of formatting in your signature use appropriate HTML.
#e.g. If multiple continuous whitespace is encountered, according to SGML
#specs, it should be merged into single whitespace until unless u give an
#entity   [non-breakable white space]. Another hack is to replace new lines
#with <br/> tags. I've also added underline to the hyperlinks by enclosing
#them in the <a> tag.

#This script requires 'fortune' for quotes and 'sed' for formatting.
#Any other program's output instead of fortune...

echo "--<br/>"
echo "Ashish Shukla \"Wah Java !!\"<br/>"
echo "--<br/>"
fortune |sed s[\$[\<br/\>[g |sed s/\ /\\\&nbsp\;/g

The Shocking Blue Green Theme Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.