April 2018
Beginner
284 pages
7h 3m
English
Also, in the same way, we can check numbers using the test and the if commands.
#!/bin/bash if [ 12 -gt 10 ] then echo "number1 is greater than number2" else echo "number1 is less than number2" fi

As expected, 12 is greater than 10.
All other numeric tests work the same way.
Read now
Unlock full access