Ravi Sir's Cards › AWS
if in 4 steps
This revision card explains if in 4 steps. It starts from the need that if runs a test. It describes exit code 0 = true. The how-to section notes strings and patterns — [[ ]]. An example on the card is numbers: (( )).
Read card text
What this card says
Why do we need it?
if runs a test.
What is it?
Exit code 0 = true.
How to do it
Strings and patterns: [[ ]].
Example
Numbers: (( )).
if (( n > 5 )); then