home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Learning the Unix Operating System

Learning the Unix Operating SystemSearch this book
Previous: 7.2 Shell Aliases and Functions Chapter 7
Where to Go from Here
Next: A. Reading List
 

7.3 Programming

Out of the hundreds of UNIX commands that have been developed, the commands for editing files are probably among the first that you should learn. As you become more familiar with other UNIX commands, you can customize your working environment and also create commands to do just what you need.

We have mentioned earlier that the shell is the system's command interpreter. It reads each command you enter at your terminal and performs the operation that you called for. The system administrator decides the type of shell that runs when you log in to your account.

The shell is just an ordinary program that can be called by a UNIX command. However, it contains some features (like variables, control structures, and so on) that make it similar to a programming language. You can save a series of shell commands in a file, called a shell script , to accomplish specialized functions.

Programming the shell should be attempted only when you are reasonably confident of your ability to use UNIX commands. UNIX is quite a powerful tool and its capabilities become more apparent when you try your hand at shell programming.

Take time to learn the basics. Then, when you're faced with a new task, take time to browse through references to find programs or options that will help you get the job done more easily. Once you've done that, learn how to build shell scripts so that you never have to type a complicated command sequence more than once.

You might also want to learn Perl. Like the shell, Perl interprets script files full of commands. But Perl has a steeper learning curve than the shell. Also, since you've already learned a fair amount about the shell and UNIX commands by reading this book, you're almost ready to start writing shell scripts now; on the other hand, Perl will take longer to learn. But if you have sophisticated needs, learning Perl is another way to use even more of the power of your UNIX system.


Previous: 7.2 Shell Aliases and Functions Learning the Unix Operating System Next: A. Reading List
7.2 Shell Aliases and Functions Book Index A. Reading List

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System