your codefor syntax highlighting when adding code. Bash : Variables, globs étendus, ERb, ERe Opérateurs booléens de comparaison de nombres Comme aux chapitres précédents on retrouve les opérateurs de comparaisons booléens de comparaison … Below mentioned is the list of parameters used for numeric comparisons 1. num1 -eq num2check if 1st number is equal to 2nd number 2. num1 -ge num2checks if 1st number is greater than or equal to 2nd number 3. num1 -gt num2checks if 1st number is greater tha… AND logical operator combines two or more simple or compound conditions and forms a compound condition. They are written using relational operators, which are a superset of those in C. Table 6.3 describes them. To check if the numbers in an variable are greater than or less than each other we use -gt or -lt operator. Binary operators apply to two arguments and are used, for example, as part of string or arithmetic comparisons (e.g. Arithmetic Expression. String Comparison means to check whether the given strings are the same or not. To learn more, see our tips on writing great answers. Did "Antifa in Portland" issue an "anonymous tip" in Nov that John E. Sullivan be “locked out” of their circles because he is "agent provocateur"? Comparison with “==” operators. #!/bin/bash a=4 b=5 # Ici, "a" et "b" peuvent être soit des entiers, soit des #+ chaînes de caractères. Lastly I hope the steps from the tutorial guide to understand different comparison operators for integers on Linux was helpful. # Il y a un certain flou entre comparaisons arithmétiques et #+ comparaisons de chaînes car les variables Bash ne sont pas #+ fortement typées. What is the highest road in the world that is accessible by conventional vehicles? ). Here both my integer variables have same number, but let's verify this using comparison operator: The output from this script returns zero exit status as both the variables have same number. In the example below, two strings are defined: strng1 and strng2. Constants. thatisuday / bash-comparison-operators.csv.