Using the "condition ? :" construct

Solution 1:

In bash , syntax is like below:

$ echo $((0 ? 5 : 6 ))
6
$ echo $((1 ? 5 : 6 ))
5