Variable Attributes
Variables can have one or more attributes that specify their internal representation, scope, or the way they are displayed.
Variable Attribute Assignment Format
typeset –H variable | Set Unix to host-name file mapping for non-Unix systems |
typeset –i variable | Set variable to be integer type |
typeset –in variable | Set variable to be integer type with base n |
typeset –l variable | Set variable to lower case |
typeset –L variable | Left justify variable; the field width is specified by the first assignment |
typeset –Ln variable | Left justify variable; set field width to n |
typeset –LZn variable | Left justify variable; set field width to n and strip leading zeros |
typeset –r variable | Set variable to be readonly (same as readonly) |
typeset –R variable | Right justify ... |
Get Korn Shell: Unix and Linux Programming Manual, Third Edition, The now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.