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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.