Path: utzoo!censor!geac!torsqnt!lethe!yunexus!ists!helios.physics.utoronto.ca!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod!think.com!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!news.funet.fi!cc.tut.fi!cc.tut.fi!mta From: mta@lehtori.tut.fi (J{rvinen Markku) Newsgroups: comp.unix.admin Subject: Re: Forcing actions at login Message-ID: Date: 15 Jan 91 10:46:57 GMT References: <6153@ecs.soton.ac.uk> <446@minya.UUCP> <1991Jan10.191546.268@am.sublink.org> <1991Jan13.231048.25341@NCoast.ORG> Sender: mta@cc.tut.fi (J{rvinen Markku) Organization: Tampere Univ. of Technology, Finland. Lines: 31 In-Reply-To: fitz@wang.com's message of 15 Jan 91 02:20:44 GMT Disclaimer: Opinions expressed below are writers own. Peruutus: Mielipiteet ovat omiani. 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@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