Essential Linux

Chapter 5: tcsh shell scripts

Overview

The tcsh is an equivalent to the C shell developed at Berkeley and is gaining favor within the UNIX world. Although it provides the same functionality as the bash (Bourne) shell, it has several unique facilities and a different shell script language. Apart from very simple bash shell scripts, the tcsh shell is largely incompatible with Bourne derived scripts, and vice versa. The reason for this is simple. The C shell, as its name implies, uses control structures similar to those used in the C programming language and are therefore not compatible with the Bourne shell. As most users use either one shell or the other, this chapter is a duplicate of the preceding chapter, except that it is totally based on tcsh (the Linux equivalent of the C shell), and all the example scripts have been converted. To compare the two shells, compare the relevant sections in these two chapters.

While the Linux command structure and the command options, in particular, are not very intuitive, the system administrator can ease this barrier by providing simpler commands for users using shell scripts. I have a whole set of such scripts that I use for disk operations. It is easier to type in backup /user/ steve than the equivalent Linux commands. Many applications have been written using shell scripts, including replacement interfaces. It is quite possible to write a shell script that simulates another user interface so the user is not aware that Linux is running.

The key...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Heat Exchangers
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.