Wrap expression in the if-statement with (( expression));
STRING_COUNT=$(grep -c 'hello world' path/to/file.txt)
echo "String count: $STRING_COUNT"
if (($STRING_COUNT == 1 )); then
sed -i 's/hello world/hello mars/' path/to/file.txt
echo "substitution complete..."
else
echo "Unable to do substitution. Did not find expression."
exit 1
fi
if [ "$(APP_TYPE)" == "if_a" ] || [ "$(APP_TYPE)" == "if_b" ]; then
echo "do if"
elif [ "$(APP_TYPE)" == "elif_a" ] || [ "$(APP_TYPE)" == "elif_b" ]; then
echo "do elif"
else
echo "doing else"
fi