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

Discipline Functions

Each variable can have zero or more discipline functions associated with it. The shell initially understands the discipline names get, set, and unset but on most systems others can be added at run time via the C programming interface extension provided by the builtin built-in utility. If the get discipline is defined for a variable, it is invoked whenever the given variable is referenced. If the variable .sh.value is assigned a value inside the discipline function, the referenced variable will evaluate to this value instead. If the set discipline is defined for a variable, it is invoked whenever the given variable is assigned a value. The variable .sh.value is given the value of the variable before invoking the discipline, ...

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