script question
Chet Ramey
chet at odin.INS.CWRU.Edu
Tue May 14 01:35:12 AEST 1991
In article <42993 at netnews.upenn.edu> pravin at 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 at po.CWRU.Edu
Case Western Reserve University NeXT Mail: chet at macbeth.INS.CWRU.Edu
``Now, somehow we've brought our sins back physically -- and they're pissed.''
More information about the Comp.unix.questions
mailing list