Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!bu.edu!nntp-read!jc From: jc@raven.bu.edu (James Cameron) Newsgroups: comp.unix.questions Subject: Re: script question Message-ID: Date: 3 Apr 91 20:32:59 GMT References: <1991Apr3.165501.25434@rodan.acs.syr.edu> Sender: news@bu.edu.bu.edu Organization: What do you mean I *can't* do that???? Lines: 36 In-reply-to: ldstern@rodan.acs.syr.edu's message of 3 Apr 91 16:55:01 GMT >>>>> On 3 Apr 91 16:55:01 GMT, ldstern@rodan.acs.syr.edu (Larry Stern) said: Larry> I have a simple script question I can't seem to get answered here. I would Larry> like my .login file to ask me if I want to read news, something to the effect Larry> of: Larry> Read new (y/n)? Larry> if "y" then rn -s15 Larry> else [prompt] Larry> Thanks in advance for any help. Larry> -Larry Stern What you would want to do is to read the manual page with the shell you are running. But, if you are using csh or tcsh, try this: echo -n "Read news now? (Y/N): " set REPLY = $< if ($REPLY == "Y" || $REPLY == "y") then rn -s15 endif Hope that helps. -- -- James Cameron (jc@raven.bu.edu) Signal Processing and Interpretation Lab. Boston, Mass (617) 353-2879 ------------------------------------------------------------------------------ "But to risk we must, for the greatest hazard in life is to risk nothing. For the man or woman who risks nothing, has nothing, does nothing, is nothing." (Quote from the eulogy for the late Christa McAuliffe.)