TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:1872] Is this hard to do?



> The other is to have my e-mail signature show a random quote from a list
> each time I send an e-mail. I don't know how to do this, except that it is
> the same concept as with the web/cgi script.

One way to do this is to have your .signature be a named pipe instead of
a regular file..

'mknod .signature p' <-- the 'p' is for Pipe..

To get a random signature, you have to run something like 

#!/bin/sh
.
.
.
while ( true ) do 
  /usr/games/fortune > ~/.signature
done
.
.
.

The '...' areas are places where you could put in some code to handle
the possibility of multiple processes (kill the other one, quit early if
another is already running, etc..

-- 
                    --== Mike Hicks ==--
http://umn.edu/~hick0088	mailto:hick0088@tc.umn.edu
                        ICQ:6883760
Linux User Since 1.2.13            Current Kernel: 2.1.125