How to test strings for lexicographic less than or equal in Bash? August 23, 2023 by Tarik Just negate the greater than test: if [[ ! "a" > "b" ]]