Shell Programs

As an interactive shell, the Z Shell's great advantages lie in its aliasing capacity and its command line and history editing mechanisms. As a programming language, it has many features, some of which are not available in other shells:

  • Powerful control structures: for…in, if…then, while, case, select, and until

  • Recursive functions

  • Local variables

  • Built-in integer arithmetic and integer data types

  • Extended trap handling

  • Input (read) and output (print) facilities

  • File control and I/O redirection for any file descriptor, including file descriptor duplication

  • Coprocess implementation

  • Array variables and string manipulation operators

Earlier sections of this chapter discussed most of these features, many of which are useful interactively as ...

Get A Practical Guide to Red Hat® Linux® 8 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.