::fun with signature files

Fortune is an itsy bitsy program in just about every Linux distribution that will give you a random quote when run.

jim@ingsoc:~$ fortune
Q: What do they call the alphabet in Arkansas?
A: The impossible dream.
jim@ingsoc:~$

This can make for minutes of fun if you’re staring at a command line wondering what to do next, but what if you want to do a little more with it?

I sometimes like to have a little fun with my email signature file, and a few months ago I thought it might be cool if I could generate a fortune for my email signature. Like a lot of people, I sometimes write a lot of email, and having to copy and paste a fortune every time I wrote an email would make the novelty quickly wear off. Instead, I decided to utilize the incredible power of bash scripting for this completely pointless endeavor. Following these simple steps can let you be as eL33t as me. Really.

And you know you want to be that cool.

So, here’s what I did.

First off, I made a directory in /home called sigs. This is just a handy place to put all of this coolness. Then inside that directory, I created a file called sigs. There’s some standard text that I want in all of my signatures, so I inserted that text. So far, that’s this:

Now you simply point your email program to your signature file. In the case of Thunderbird, you do this by going to Edit/Account Settings, and point to /home/you/sigs/sig. Open a new message to compose, and see your awesome skills in action.

But we’re not done here. Oh no. If you stop here, then the file never changes, and that defeats the point. So we’ll add this little slice of pimpness to our crontab for some real fun.

jim@ingsoc:~/sigs$ crontab -e

And do a little something like this:

# m h dom mon dow command
* * * * * /home/jim/sigs/./sigmaker

This will run sigmaker once every minute, giving you a new signature file with just about every email you write. You, of course, can change the timing however you like.

And there you have it, kids. A complete waste of time that’s good and good for you.

Blog Stats

21,433 hits

contact jimbo

want to write to me, but don't want the scandal of a public comment for all the world to see?
don't worry, no one reads this anyway.
if you do feel like sending an email, you can write to:
jim at gotjim dot net