Click to See Complete Forum and Search --> : Random MOTD ?
Nailz
12-15-2000, 12:54 PM
How do I set my MOTD to be random?
I have a list of messages that I'd like to display...funny quips, sayings, etc. But I don't want to go in and change it
all the time. I want to supply a list and have it randomized? Any ideas or programs out there to do it?
------------------
$> cd /pub
$> more beer
YaRness
12-15-2000, 02:39 PM
can't you use the fortune program to do something like that? i think it's got options to specify types of fortunes, i think the types are just divided up by directory.
------------------
"Assembly of Japanese bicycle require great peace of mind."
Registered Linux User #188285 http://counter.li.org/
------------------
TheLinuxDuck
12-15-2000, 04:19 PM
Yea, just set up fortune to run during boot up as:
fortune > /etc/motd
That way it will always be fresh each time you login.
------------------
TheLinuxDuck
Wait... that's a penguin?!?!?
:wq
Sterling
12-15-2000, 05:37 PM
The best way is to run fortune from /etc/profile, which is executed on login by BASH and all other Bourne-style shells. Then set up a fortune database (sorry, I don't know how to do this) with the quotes and so on you want in it.
------------------
-Sterling
-This post made with the Lizard! (http://www.mozilla.org)