Path: utzoo!censor!geac!torsqnt!hybrid!scifi!bywater!uunet!wang!fitz From: fitz@wang.com (Tom Fitzgerald) Newsgroups: comp.unix.admin Subject: Re: Forcing actions at login Message-ID: Date: 15 Jan 91 02:20:44 GMT References: <6153@ecs.soton.ac.uk> <446@minya.UUCP> <1991Jan10.191546.268@am.sublink.org> <1991Jan13.231048.25341@NCoast.ORG> Organization: Wang Labs, Lowell MA, USA Lines: 23 allbery@NCoast.ORG (Brandon S. Allbery KB8JRR) writes: > $ sed -n 6,10p /etc/profile > if test ! -f $HOME/.hushlogin; then > if newer-than /etc/motd $HOME/.enoughalready; then > cat /etc/motd > touch $HOME/.enoughalready > fi > fi > $ cat newer-than.c > #include > #include [...] Why write C code? I think this is portable (though, admittedly, ugly): if test ! -f $HOME/.hushlogin; then /bin/find /etc/motd -newer $HOME/.enoughalready -exec cat {} \; 2>/dev/null touch $HOME/.enoughalready fi --- Tom Fitzgerald Wang Labs fitz@wang.com 1-508-967-5278 Lowell MA, USA ...!uunet!wang!fitz