Forcing actions at login
J{rvinen Markku
mta at lehtori.tut.fi
Tue Jan 15 21:46:57 AEST 1991
Tom> Why write C code? I think this is portable (though, admittedly, ugly):
I agree, no one-use programs to my bin.
Tom> if test ! -f $HOME/.hushlogin; then
Tom> /bin/find /etc/motd -newer $HOME/.enoughalready -exec cat {} \; 2>/dev/null
Tom> touch $HOME/.enoughalready
Tom> fi
Well I have allways liked my own solution, just have (looooonngg line)
find /etc/motd -newer ${HOME}/.hushlogin -exec cat {} \; -exec touch ${HOME}/.hushlogin \; -o ! -newer ${HOME}/.hushlogin -exec head -1 {} \;
in your .login, just one find which shows /etc/motd or first line of it
depending have you seen it already.
Tom> Tom Fitzgerald Wang Labs fitz at wang.com
- mta
--
Quote: UNIX systems always run in one state or another.
- RISC/os (UMIPS) System Administrator's Guide
Markku Jarvinen, last a with two dots over it | Tampere University of Tecnology
address: mta@{cc.,}tut.fi or ..!mcsun!tut!mta | Tampere, Finland
--
Quote: UNIX systems always run in one state or another.
- RISC/os (UMIPS) System Administrator's Guide
Markku Jarvinen, last a with two dots over it | Tampere University of Tecnology
address: mta@{cc.,}tut.fi or ..!mcsun!tut!mta | Tampere, Finland
More information about the Comp.unix.admin
mailing list