[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

regarding dynamic email signatures.....



There was a thread some time back regarding dynamic email signatures.
A friend of mine told me a way to do it and so I am mentioning the same
here.

I am just sharing the method here so there is no question embedded in
this mail.

1)first of all you would have to make a fifo file

[tom toshiba(21:58:01) (Sun Feb 09)~$
mkfifo .signature
[tom toshiba(21:58:08) (Sun Feb 09)~$
 ls -a .signature
 .signature
 [tom toshiba(21:58:19) (Sun Feb 09)~$
 ls -al .signature
 prw-r--r--    1 tom      tom             0 Feb  9 21:58 .signature
  
2) then you'll have to use the fortunes game which is installed by
default in /usr/games/fortune
in the following manner.......
[tom toshiba(22:01:37) (Sun Feb 09)~$
 /usr/games/fortune | sed -e "s/^/|/g"
 
 |Desires and aspirations are but natural, like the life
 |instinct encased in a seed, seeking to sprout
 |(curbing greed - 1), Thirukkural
 
notice that the beginning of each line is substitued with a "|"
character..

3) create a prefix and suffix file as follows.....

[tom toshiba(22:03:39) (Sun Feb 09)~/.sig$
 cat prefix
 +--------------------------------------------<tom symonds net>------------------------------------+
 [tom toshiba(22:03:49) (Sun Feb 09)~/.sig$
  cat suffix
 +-------------------------------------------------------------------------------------------------+
  

Now all that needs to be done is to cat the prefix first ....run the fortune cookie
and then cat the suffix last....

something like
[tom toshiba(22:05:12) (Sun Feb 09)~/bin$
 cat boxedkural.sh

#! /bin/bash

 cat ~/.sig/prefix
 /usr/games/fortune humorists | sed -e "s/^/|/g"
 cat ~/.sig/suffix

Now if we make this file an executable and run it then the output is
something like this.....

[tom toshiba(22:05:16) (Sun Feb 09)~/bin$
 ./boxedkural.sh
 +--------------------------------------------<tom symonds net>------------------------------------+
 |He asked me if I knew what time it was -- I said yes, but not right
 now.
 |               -- Steven Wright
 +-------------------------------------------------------------------------------------------------+

4)Now you have to direct this to your ~/.signature file......so

[tom toshiba(22:07:46) (Sun Feb 09)~/bin$
 ./boxedkural.sh > ~/.signature

Depending on your client you can set the signature file to ~/.signature
and for every mail you compose a new signature is created......

this is absolutely off topic but I thought I might share it with you
as it was discussed on the list some time back.


best regards
Tom ! 
 
-- 
+--------------------------------------------<tom symonds net>------------------------------------+
|I never forget a face, but in your case I'll make an exception.
|		-- Groucho Marx
+-------------------------------------------------------------------------------------------------+





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]