awk/testdir/t.cond

4 lines
173 B
Plaintext
Raw Normal View History

2019-06-23 09:13:57 +00:00
{ print (substr($2,1,1) > substr($2,2,1)) ? $1 : $2 }
{ x = substr($1, 1, 1); y = substr($1, 2, 1); z = substr($1, 3, 1)
print (x > y ? (x > z ? x : z) : y > z ? y : z) }