You can control the case, length, quoting, and other aspects of the format of values resolved from variables
Option |
Description |
---|---|
.L |
Lower-case characters |
.U |
Upper-case characters |
.F |
Combined with L or U, applies conversion to first character |
.q |
Enclose the variable between single quotes if it is not already. |
.Q |
Enclose the variable between double quotes if it is not already. |
.T |
Removes blank spaces |
.H |
Converts number to hexadecimal |
.c |
Upper-case first letter and lower-case next letters |
.n |
Maximum length where n is the number of characters |
nJ |
Justifies to fixed length where n is the number of characters |
-nJ |
Right justify variable text to fixed length where n is the number of characters |
width |
Copies the specified minimum number of characters to the output buffer |
.[-]precision |
Copies the specified maximum number of characters to the output buffer |
M |
Extracts a portion of the variable name, this option uses the width and precision parameters to identify the portion to extract |