Can anyone give a sample example of comparing two strings using matching concept in unix shell programming.
say we have two strings,S1 = ravi and S2 = kiran
how can i use matching concept to compare S1 and S2
Can anyone please help me.
Can anyone give a sample example of comparing two strings using matching concept in unix shell programming.
say we have two strings,S1 = ravi and S2 = kiran
how can i use matching concept to compare S1 and S2
Can anyone please help me.
# expr hoomer : bart
0
# expr simpson : simpson
7
s1="Ravi"
s2="Kiran"
if [ $s1 != $s2 ]
then
echo "Both are different"
else
echo "Both are same"
fi