Scripting question concerning random selection of a phrase from a database
I am trying to set up a script that randomly selects from a list of phrases such as "I'm meltiiing..." or "All good things must come to an end" every time I shut down.
So far, I have this, roughly (going from memory): Quote:
I appreciate any help, cjay |
Investigate the fortune program, which is designed for this purpose. It also comes with a huge colection of phrases.
|
If you want your own customized quotes and not fortune's bundled ones, you can make your own.
Just create a file (e.g. 'myquotes') in /usr/share/fortune/ with formatting and line-separators similar to the ones in existing fortune files Create a dat file by running strfile myquotes myquotes.dat Call it from fortune by running fortune myquotes See this link for details. |
All times are GMT -5. The time now is 11:26 PM. |