I have the following if block in my bash script:if [ ${PACKAGENAME} -eq kakadu-v6_4-00902C ]; then  echo successfully entered if block!!fiThe script execution is not entering my if block even though $PACKAGENAME is equal to kakadu-v6_4-00902C. What am I doing wrong?
Comparing two strings in Bash
bash;shell script;test
-eq is an arithmetic operator, which compares two numbers.Use = (portable/standard sh), =~ or == instead.Also use quotes, because if ${PACKAGENAME} contains a whitespace or wildcard character, then it will be split into multiple arguments, which causes to make [ see more arguments than desired. See here a list of common bash pitfalls.if [ ${PACKAGENAME} = 'kakadu-v6_4-00902C' ]; then    echo successfully entered if block!!fiSee man bash, search (/) for CONDITIONAL EXPRESSIONS.