Some time ago I tried to use an external script to generate a signature on Evolution, but couldn't find out how to stop it wrapping all the text into one jumbled paragraph. Nothing (that I could find) gave any real, or useful, details about how to use scripts.
It didn't occur to me, until now, that was because Evolution treats all message composition as HTML (just look at the message source code of anything you save in the “drafts” folder), even when you're going to send as plain text (it converts the results when you press “send” in the message editor). So you ought to write your script to produce the signature as HTML (see the following example). Save your script somewhere appropriate, and write the path to it in the signature configuration preferences in Evolution.
#!/bin/bash echo "<div>-- </div>" echo "<p>I might put a personalised signature, here.</p>" echo "<p>Uptime: " uptime echo "</p>" echo "<pre>" /usr/bin/fortune -s echo "</pre>"
This script starts off with the shebang line to a script interpreter, I've referred to my BASH one. Don't forget to, also, set the executable bit onto your script file.
Next is a signature separator line. This allows nice mail clients to easily, and automatically, strip off your signature when they reply to your message. It needs to be a dash, dash, blank space, sequence of characters, on on a line by themselves (as per my example).
Then comes an example of some static text that you could insert.
Followed by a block showing how long my computer has been running for (“uptime” is a command on most *ix systems).
Lastly, there's a block that'll produce a random fortune cookie (this time, I've provided the full path to the command). The “-s” option tells it to only use short fortunes.
For those unfamiliar with authoring HTML, the <div> & </div> tags mark-up a division of text (a block) to be separated from the rest, the <p> & </p> tags around something denote a paragraph, and the <pre> & </pre> tags surround preformatted text that you want to keep formatted the same way (most fortune cookies are pre-formatted; and many make no sense, or just look terrible, if you destroy that formatting).
Here would be the end of the message I'm replying to… -- I might put a personalised signature, here. Uptime: 02:42:32 up 17:47, 3 users, load average: 0.51, 0.52, 0.37 All generalizations are false, including this one. -- Mark Twain
NB: I've made the example complex to demonstrate how to do several different things, with separating space between them, all in one example. I wouldn't advise posting with such a signature, people get mightily peeved at long signatures. On that note, if you're going to use the fortune program, investigate the options for picking short fortunes and avoiding the offensive ones.