Pages

Tuesday, March 19, 2013

Write a script to accept two strings and check the given strings are equal or not?


$vi two_strings.sh
echo “enter first string:”
read s1
echo “enter second string:”
read s2
if [ "$s1" = "$s2" ]
then
echo “equal”
else
echo “not equal”
fi
:wq

No comments:

Post a Comment