On 30 Jan 2003 15:38:01 -0700
heather <[EMAIL PROTECTED]> wrote:

> I see lots of ppl have the Fortune program make them a sig for email. 
> Usually random.  How do I do this or where can I go for information on
> how to do this neat trick? :)
> 
> Ty
> Femme

Here's mine:

#!/bin/bash 
echo "-- "
echo "Todd Slater"
if [ -p /tmp/xmms-info ] ; then
        echo "The current tune is $( grep Title: /tmp/xmms-info | awk -F': '
        '{print $2}' )" 
fi 
echo "$( fortune /home/todd/sig/mdk )"
echo "Got a great Mandrake-Linux tip bookmarked? Send it to me and I'll
include it in my newbie tips fortune file!"
exit

The xmms-info is just to see if xmms is running and if it is it prints the
song title.

You can create your own fortune list by putting the quotes in a file--one
per line, separated by a line with %. Then you run "strfile filename" and
it creates the .dat file for that list. So, when you call fortune, you can
specify the file you want to use. You can also decide to use a percentage
from each set you've got. For example, see all the collections in
/usr/share/games/fortunes. You could say use 80% from politics and 20%
from startrek.

Man fortune is your friend on this one.

Todd

-- 
Todd Slater
The current tune is steve earle - i feel alright
Mandrake Newbie mailing list help:
<mailto:[EMAIL PROTECTED]?subject=help>
Got a great Mandrake-Linux tip bookmarked? Send it to me and I'll include
it in my newbie tips fortune file!

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to