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


Escape sequences

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

All the format strings shown so far have ended in \n. This kind of construct is called an escape sequence. All escape sequences are made from a backslash character (\) followed by one to three other characters.

Escape sequences are used inside strings, not just those for printf, to represent special characters. In particular, the \n escape sequence represents the newline character. A \n in a printf format string tells awk to start printing output at the beginning of a newline.

The following list shows escape sequences that can be used in awk strings:

Escape ASCII character
\a Audible bell
\b Backspace
\f Formfeed
\n Newline
\r Carriage return
\t Horizontal tab
\v Vertical tab
\ooo ASCII character, octal ooo
\xdd Hexadecimal value dd
\" Quote
\c Any other character c

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014