O'Reilly logo

Korn Shell: Unix and Linux Programming Manual, Third Edition, The by Anatole Olczak

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 variableSet Unix to host-name file mapping for non-Unix systems
typeset –i variableSet variable to be integer type
typeset –in variableSet variable to be integer type with base n
typeset –l variableSet variable to lower case
typeset –L variableLeft justify variable; the field width is specified by the first assignment
typeset –Ln variableLeft justify variable; set field width to n
typeset –LZn variableLeft justify variable; set field width to n and strip leading zeros
typeset –r variableSet variable to be readonly (same as readonly)
typeset –R variableRight justify ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required