Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!agate!usenet.ins.cwru.edu!odin!chet From: chet@odin.INS.CWRU.Edu (Chet Ramey) Newsgroups: comp.unix.questions Subject: Re: script question Message-ID: <1991May13.153512.15852@usenet.ins.cwru.edu> Date: 13 May 91 15:35:12 GMT References: <1991Apr10.145212.10124@cbfsb.att.com> <1991Apr12.194931.25482@jersey> <42993@netnews.upenn.edu> Sender: news@usenet.ins.cwru.edu Reply-To: chet@po.CWRU.Edu Organization: Yoyodyne Propulsion Systems, Inc. Lines: 28 Nntp-Posting-Host: odin.ins.cwru.edu In article <42993@netnews.upenn.edu> pravin@eniac.seas.upenn.edu writes: >> >> echo "Read news[CR=yes/n] \c" >> read ans >> if [ ! "$ans" ] >> etc,etc. > >This does not work for me in my .profile file. I get an error at the >first line. BTW, my login shell is bash. Does this script not work >with bash, or I am doing something wrong. The bash built-in echo is a 10th Edition Unix-style echo; it needs the -e flag to enable backslash-escaped character interpretation. This should work for you: echo -n "Read news[CR=yes/n] " read ans if [ ! "$ans" ] etc,etc. Chet -- Chet Ramey Internet: chet@po.CWRU.Edu Case Western Reserve University NeXT Mail: chet@macbeth.INS.CWRU.Edu ``Now, somehow we've brought our sins back physically -- and they're pissed.''