Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!linac!att!cbfsb!cbnewsb.cb.att.com!pfinkel From: pfinkel@cbnewsb.cb.att.com (paul.d.finkel) Newsgroups: comp.unix.questions Subject: Re: script question Message-ID: <1991Apr10.145212.10124@cbfsb.att.com> Date: 10 Apr 91 14:52:12 GMT References: <1991Apr3.165501.25434@rodan.acs.syr.edu> <1991Apr10.144150.10011@cbfsb.att.com> Sender: news@cbfsb.att.com Distribution: na Organization: Swim Team Dads of America Lines: 32 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. -- Family motto: Semper ubi, sub ubi. mail: attmail!pfinkel "My name is Fink, whaddaya think, I press pants for nothing?" (Punch line to corny joke that my father always told!)