diff options
| author | Adam Olech <nddr89@gmail.com> | 2021-11-11 13:45:18 +0100 |
|---|---|---|
| committer | Adam Olech <nddr89@gmail.com> | 2021-11-11 13:45:18 +0100 |
| commit | 0ca9324c5f48ef91ffd75ceac242ac4a7d9ef166 (patch) | |
| tree | 71e856cbe0117b00c30400222dc0b6811c31eb96 /extract-data-from-abs-guide | |
| parent | b057908f71ebac8fa7e8b80dddb5b3a16ca1c355 (diff) | |
Add eq.txt
Diffstat (limited to 'extract-data-from-abs-guide')
| -rw-r--r-- | extract-data-from-abs-guide/files/eq.txt | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/extract-data-from-abs-guide/files/eq.txt b/extract-data-from-abs-guide/files/eq.txt new file mode 100644 index 0000000..9db0882 --- /dev/null +++ b/extract-data-from-abs-guide/files/eq.txt @@ -0,0 +1,68 @@ + -eq + is equal to + + if [ "$a" -eq "$b" ] + + -ne + is not equal to + + if [ "$a" -ne "$b" ] + + -gt + is greater than + + if [ "$a" -gt "$b" ] + + -ge + is greater than or equal to + + if [ "$a" -ge "$b" ] + + -lt + is less than + + if [ "$a" -lt "$b" ] + + -le + is less than or equal to + + if [ "$a" -le "$b" ] + + < + is less than (within double parentheses) + + (("$a" < "$b")) + + <= + is less than or equal to (within double parentheses) + + (("$a" <= "$b")) + + > + is greater than (within double parentheses) + + (("$a" > "$b")) + + >= + is greater than or equal to (within double parentheses) + + (("$a" >= "$b")) + + string comparison + + = + is equal to + + if [ "$a" = "$b" ] + + Caution + + Note the whitespace framing the =. + if [ "$a"="$b" ] is not equivalent to the above. + + == + is equal to + + if [ "$a" == "$b" ] + + This is a synonym for =. |
