O'Reilly logo

A Practical Guide to Red Hat® Linux® 8 by Mark G. Sobell

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

Functions

A shell function is similar to a shell script, storing a series of commands for execution at a later time. However, because the shell stores a function in the computer's main memory (RAM) instead of in a file on the disk, you can access it more quickly than you can access a script. Also, the shell preprocesses (parses) a function so that it starts up more quickly than a script. Finally, the shell executes a shell function in the same shell that called it.

You can declare a shell function in your .bash_profile file, in the script that uses it, or directly from the command line. You can remove functions with the unset builtin . The shell ...

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