Tuesday 3 November 2015

Linux Shell program to compare two strings

echo enter s1
read s1
echo enter s2
read s2
if test [s1-eq s2 ]
then
echo "Same"
else
echo "Not"
fi


OUTPUT:
enter s1 Marshal
enter s2 marshal

Not

No comments:

Post a Comment