Shell Scripts

With tcsh you can execute files containing TC Shell commands, just as bash and zsh can execute files containing Bourne Again and Z Shell commands. The concepts of writing and executing scripts in the two shells are similar. However, the methods of declaring and assigning values to variables and the syntax of control structures are different.

You can run bash, tcsh, and zsh scripts while using any one of the shells as a command interpreter. Various methods exist for selecting the shell that runs a script. Refer to “#! Specifies a Shell” on page 564 for more information.

If the first character of a shell script is a pound sign (#) and the following character is not an exclamation point (!), the TC Shell executes the script under ...

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.