z/OS UNIX System Services User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


String values

z/OS UNIX System Services User's Guide
SA23-2279-00

A string value is just a sequence of characters, like "abc". A string value is always enclosed in quotes. All types of characters are allowed (even digits, as in "abc123"). Strings can contain any number of characters. A string with zero characters is called the null string, and is written "".

When awk compares strings, it makes comparisons in accordance with the collating order set by the locale that is defined on the system. This is a little like alphabetic order; for example, the program:
$1 >= "Katie"
prints the Katie, Linda, and Lori lines, which is what you would expect from alphabetic order. However, collating orders differ. ASCII collating order, for example, differs from alphabetic order in a number of respects; for example, lowercase letters are greater than uppercase ones, so that a is greater than Z.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014