Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!apple!mrspoc!itkin From: itkin@mrspoc.Transact.COM (Steven M. List) Newsgroups: comp.unix.questions Subject: Re: script question Message-ID: <1991Apr11.222929.27777@mrspoc.Transact.COM> Date: 11 Apr 91 22:29:29 GMT References: <1991Apr3.165501.25434@rodan.acs.syr.edu> <1991Apr10.144150.10011@cbfsb.att.com> <1991Apr10.145212.10124@cbfsb.att.com> Reply-To: steven@Transact.COM Distribution: na Organization: Transact Software Lines: 44 pfinkel@cbnewsb.cb.att.com (paul.d.finkel) writes: >In article <1991Apr10.144150.10011@cbfsb.att.com> pfinkel@cbnewsb.cb.att.com (paul.d.finkel) writes: >>In article <1991Apr3.165501.25434@rodan.acs.syr.edu> ldstern@rodan.acs.syr.edu (Larry Stern) writes: >>>I have a simple script question I can't seem to get answered here. I would >>>like my .login file to ask me if I want to read news, something to the effect >>>of: >>> Read new (y/n)? >>> if "y" then rn -s15 >>> else [prompt] >> >>How about: >> >> echo "Read news[CR=y/n]? \c" >> read ans >> if [ "$ans" = "" ] >> then >> news >> else >> : >> fi >> > >Sorry, it could have been > > echo "Read news[CR=yes/n] \c" > read ans > if [ ! "$ans" ] > > etc,etc. How about if he said ".login" assuming that it must be the C shell? /bin/echo "Read news (y/n) [y] \c" set reply = `line` if ( "$reply" == "y" || "$reply" == "" ) then rn... endif -- +----------------------------------------------------------------------------+ : Steven List @ Transact Software, Inc. :^>~ : : Chairman, Unify User Group of Northern California : : itkin@Transact.COM :