1 #!/bin/bash
2
3 #### tuple comparison
4 var t1 = 3, 0
5 var t2 = 4, 0
6 var t3 = 3, 1
7
8 if (t2 > t1) { echo yes1 }
9 if (t3 > t1) { echo yes2 }
10 if ( (0,0) > t1) { echo yes3 }
11
12 # NOTE: ((0,0) causes problems -- it looks like a shell statement!
13 #if ( (0,0) > t1) { echo yes3 }
14 ## STDOUT:
15 yes1
16 yes2
17 ## END
18
19
20 #### tuple literal doesn't conflict with ((
21 if ((0,0) < (0,1)) { echo yes }
22 ## STDOUT:
23 yes
24 ## END