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.
Page 1 of 1
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.
clear
echo "Enter a color:"
read color
s1=$color
s2="BLACK"
if test $s1=$s2
then
echo "Accepted"
else
echo "Not Accepted"
fi
echo "Enter a color:"
read color
s1=$color
s2="BLACK"
if test $s1=$s2
then
echo "Accepted"
else
echo "Not Accepted"
fi
1987ronnie- Posts : 3
Join date : 2010-07-20
Similar topics
» WASS to accept a string from the user and display number of vowels
» Prog 17. WASS to accept a weekday ( 1 ,2 3 …7) from user using command line and print appropriate day in words ( Monday , Tuesday , Wednesday )
» 35. WASS to print your name until the user presses Q or q button
» 39. WASS which accept a file name and print last 10 lines of the file
» 38. WASS to check whether the word given is a palindrome or not.
» Prog 17. WASS to accept a weekday ( 1 ,2 3 …7) from user using command line and print appropriate day in words ( Monday , Tuesday , Wednesday )
» 35. WASS to print your name until the user presses Q or q button
» 39. WASS which accept a file name and print last 10 lines of the file
» 38. WASS to check whether the word given is a palindrome or not.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum