The shell script is expected to call only one function, but calling both. How to fix this, the output is
both are same
both are not same
#!/bin/bash
var1=ORCL
var2=ORCL
function f1
{
echo "both are same"
}
function f2
{
echo "both are not same"
}
if [ $var1=$var2 ];
then
f1
fi
if [ $var1!=$var2 ];
then
f2
fi