Chapter 20. The ash Shell

IN THIS CHAPTER

  • Introducing the ash shell

  • Parts of the ash shell

  • The dash shell

  • Scripting differences

Now that you've seen the standard Linux bash shell, and what you can do with it, it's time to examine a few other shells available in the Linux world. The ash shell is a low-budget shell that offers basic features with a small footprint. This is perfect for low-memory applications, such as embedded Linux systems. This chapter describes the ash shell environment and shows you what you'll need to know to work with your scripts in an ash shell environment.

What Is the ash Shell?

The first trick to understanding the ash shell is figuring out what version of it you're using. The ash shell started out life as a simple copy of the original Bourne shell available on Unix systems (see Chapter 1). Kenneth Almquist created a small-scale version of the Bourne shell for Unix systems and called it the Almquist shell, which was then shortened to ash. This original version of the ash shell was extremely small, making it fast, but without many advanced features, such as command line editing or history features, making it difficult to use as an interactive shell.

The NetBSD Unix operating system adopted the ash shell and still uses it today as the default shell. The NetBSD developers customized the ash shell by adding several new features, making it closer to the Bourne shell. The new features include command line editing using both emacs and vi editor commands, as well as a history ...

Get Linux® Command Line and Shell Scripting Bible 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.