script question

Mike Tietel mjt at jersey
Sat Apr 13 05:49:31 AEST 1991


In article <1991Apr10.145212.10124 at cbfsb.att.com> pfinkel at cbnewsb.cb.att.com (paul.d.finkel) writes:
>In article <1991Apr3.165501.25434 at rodan.acs.syr.edu> ldstern at 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
          ^^^^^^
>
>How about:
>
>			echo "Read news[CR=yes/n] \c"
>			read ans
>			if [ ! "$ans" ]
>				etc,etc.


of course if you want something to work in .login (i.e., csh):

        echo -n "Read news[y|n] "
        set c=($<)
        if ( $c != n ) then
                rn
        else
                ...
        endif

-- 
Mike Tietel			mjt at jersey.orb.mn.org
Euler Solutions, Inc.		..!orbit!jersey!mjt



More information about the Comp.unix.questions mailing list