O'Reilly logo

Linux® Command Line and Shell Scripting Bible by Richard Blum

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

Chapter 21. The tcsh Shell

IN THIS CHAPTER

  • The history of the tcsh shell

  • Parts of tcsh

  • Using the tcsh shell

Another popular alternative shell available in the Linux world is the C shell. The C shell, as you might guess, is somewhat of an attempt to incorporate features found in the C programming language into shell scripting. The most popular version of the C shell implemented in open source is the tcsh shell. This chapter discusses the tcsh shell, describing its features, and showing how to write shell scripts for it.

What Is the tcsh Shell?

The C shell was developed at the University of California, Berkeley by Bill Joy as a replacement for the original Unix shell created at AT&T Labs (before there was even a Bourne shell). Developers at Berkeley had designed and built a Unix system to compete with AT&T Unix, and the C shell was their choice for the default shell. This version of Unix is popularly called the Berkeley Software Distribution (or BSD Unix). The goal of the C shell was to provide a command line and scripting environment that C programmers would be comfortable with.

In the late 1970s Ken Greer created an extension to the C shell that added command line editing features found in the TENEX operating system. This is where the name tcsh came from. The tcsh shell has become a popular shell for many Unix systems patterned after BSD Unix (including early versions of the Mac OS X operating system; newer versions now use the bash shell as the default).

While the bash shell has become ...

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