Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Show a random message at bash shell startup' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Show a random message at bash shell startup
Authored by: S Barman on May 14, '07 08:42:31PM
Back in the olden days, we used to have /usr/bin/fortune to do just this. This program was put into our .profile or .login to print right before the prompt. It was a single program that would read a specific file, usually /usr/lib/fortunes, and/or ~/.fortunes. There was even an "obscene" mode (-o) that would include those fortunes that were considered obscene in the mix.

I found an open source version of /usr/bin/fortune here. Using this program may be easier than a shell/awk/perl/php/etc script!

[ Reply to This | # ]

Show a random message at bash shell startup
Authored by: EddEdmondson on May 15, '07 08:49:00AM

You've linked to Linux versions!

Anyway, fortune's available through the usual Fink or MacPorts methods or you can no doubt track down the source and compile it that way instead.



[ Reply to This | # ]