script question

paul.d.finkel pfinkel at cbnewsb.cb.att.com
Thu Apr 11 00:52:12 AEST 1991


In article <1991Apr10.144150.10011 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
>>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!)



More information about the Comp.unix.questions mailing list