Converting string to int doesn't work properly in terminal.
I want to find how much time specific string occur in a big string.
if ((echo "iOS/i" | grep -o iOS/ | wc -l | bc)>2) then echo "ThreeOrMore"; else echo"TwoOrLess"; fi
result
ThreeOrMore
But the result actually should be TwoOrLess
but inner part works well
echo "iOS/i" | grep -o iOS | wc -l | bc
result
1