O'Reilly logo

Solaris™ 8 Advanced System Administrator's Guide, Third Edition by Janice Winsor

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

User-Defined Functions

You can write your own functions in the Bourne and Korn shells and use them as part of other scripts.

NOTE

Not all Bourne shells support functions. However, the Solaris Bourne shell does support functions.

User-defined functions are useful if you have a series of commands that you want to use repeatedly. The functions written for an application server are an example of user-defined functions. Some examples of functions are provided in “Example Scripts”. When you define a function, you use the name of the function at the place where you want to execute the series of commands contained in the function.

Typically, you define functions at the beginning of a script, but you can define them in separate files and share them between ...

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