Variable Attributes

   

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

Table of Contents
Appendix G.  Pdksh Quick Reference


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 variable; the field width is specified by the first assignment

typeset Rn variable

Right justify variable; set field width to n

typeset RZn variable

Right justify variable; set field width to n and fill with leading zeros

typeset t variable

Set the user-defined attribute for variable. This has no meaning to the Korn shell.

typeset u variable

Set variable to upper case

typeset x variable

Automatically export variable to the environment (same as export)

typeset Z variable

Same as typeset RZ


       
    Top
     



    Korn Shell. Unix and Linux Programming Manual, Third Edition
    Korn Shell. Unix and Linux Programming Manual, Third Edition
    ISBN: N/A
    EAN: N/A
    Year: 2000
    Pages: 177

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net