[ale] Dumb shell scripting question

Ken Nagorski kenn at pcintelligent.com
Wed Mar 21 14:29:52 EST 2001


Hi there,

	I have stuff like this before but I am having a problem with this
peice of code. 

echo -n "Are the drive ready to be formated and mounted? [y/n] "
read confirm
if [ $confirm=n ]
 then
  echo "bye..."
  exit 0
fi

	No matter what it exits... Maybe I am just going nuts. But I
thought bash would return 1 only if the comparison was true. right? For
some reason no matter what it echo's bye and exits. Hmm, not the desired
result... 
	Did I just lose my mind. Cause this is liek pretty simple bash no?

OK, thanks
Ken 

-- 
 I couldn't quite remember what I was going to say 
           so I causally tip another sip of whatever it was I was drinking,

--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.





More information about the Ale mailing list