The POSIX standard says that string comparison is performed based on the locale's collating order. This is usually very different from the results obtained when doing straight character-by-character comparison.1
Because this behavior differs considerably from existing practice, gawk only implements it when in POSIX mode (see Options). Here is an example to illustrate the difference, in an ‘en_US.UTF-8’ locale:
$ gawk 'BEGIN { printf("ABC < abc = %s\n", > ("ABC" < "abc" ? "TRUE" : "FALSE")) }' -| ABC < abc = TRUE $ gawk --posix 'BEGIN { printf("ABC < abc = %s\n", > ("ABC" < "abc" ? "TRUE" : "FALSE")) }' -| ABC < abc = FALSE
[1] Technically, string comparison is supposed
to behave the same way as if the strings are compared with the C
strcoll()
function.