something like motd question
Andre van Dalen
andre at targon.UUCP
Fri May 17 07:22:42 AEST 1991
In article <bshaw.673889495 at hcmv2> bshaw at hcmv2.ti.com (bob shaw) writes:
>I would like to have a file that is read when a user logs in
>*IF* this file has been updated since it was last read by this
>user. This file would contain specific system news info, etc and
>would constantly be changed by the sys_admin.
You could add something like this to /etc/profile,
put your message in the file /etc/new_motd, . in the next lines
is the users home directory, which is where his shell starts.
(This example uses /bin/sh as login shell.)
if [ -n "`find /etc/new_motd -newer . -print`" ]
then
cat /etc/new_motd
touch .
fi
hope this helps,
--
The mail| AAA DDDD It's not the kill, but the thrill of the chase.
demon...| AA AAvv vvDD DD Ketchup is a vegetable.
hits!.@&| AAAAAAAvv vvDD DD {nixbur|nixtor}!adalen.via
--more--| AAA AAAvvvDDDDDD Andre van Dalen, uunet!hp4nl!targon!andre
More information about the Comp.unix.admin
mailing list