I\'m starting to learn about writing scripts for the bash terminal, but I can\'t work out how to get the comparisons to work properly. The script I\'m using is:
Plain and simple
#!/bin/bash
a=2462620
b=2462620
if [ "$a" -eq "$b" ];then
echo "They're equal";
fi
You can check out this cheatsheet if you want more number comparsions in the wonderful world of Bash Scripting.
Shortly, integers can only be compared with:
-eq # equal
-ne # not equal
-lt # less than
-le # less than or equal
-gt # greater than
-ge # greater than or equal