I wrote simple script to compare commit values in bash. Where as I am getting error.
export GIT_COMMIT=66597933406267ccb159c455b852480698b2c892
export LAST_COMMIT=66597933406267ccb159c455b852480698b2c892
if [[ -z "$LAST_COMMIT" || "$LAST_COMMIT" -eq "$GIT_COMMIT" ]]; then
echo LAST_COMMIT='HEAD~1' > ~/Desktop/build.properties
fi
commit.sh: line 3: [[: 66597933406267ccb159c455b852480698b2c892: value too great for base (error token is "66597933406267ccb159c455b852480698b2c892")
Both variable values are dynamic. for testing purpose, manually assigned.
May I know what could be the issue and best way to compare it in shell script.