Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

bash compare numbers

bash if greater thanShell/Bash By Me (Armandres) on Feb 18 2021 DonateDeleteEdit
if (( a > b )); then
    ...
fi
#Use above example or below one:
if [ "$a" -gt "$b" ]; then
    ...
fi
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #bash #compare #numbers
ADD COMMENT
Topic
Name
4+2 =