Variables have a syntax that can force a format on their values, as follows:
Format code |
Format of variable value in script |
---|---|
.L |
Lower-case characters |
.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 |
.U |
Upper-case characters |
.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 |