CHRIST MCA 2009-2012
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Prog31. WASS to accept a color name from the user and check whether its equal to BLACK , if so print message as accepted else display not accepted.

Go down

Prog31. WASS to accept a color name from the user and check whether  its  equal to BLACK , if so print message as accepted else display not accepted. Empty Prog31. WASS to accept a color name from the user and check whether its equal to BLACK , if so print message as accepted else display not accepted.

Post  1987ronnie Tue Jul 20, 2010 11:54 pm

clear
echo "Enter a color:"
read color
s1=$color
s2="BLACK"
if test $s1=$s2
then
echo "Accepted"
else
echo "Not Accepted"
fi

Very Happy Laughing

1987ronnie

Posts : 3
Join date : 2010-07-20

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum