Linux Application Development For The Enterprise (Charles River Media Programming)
| < Day Day Up > |
|
Introduction
In the previous chapter, you were introduced to some powerful Linux tools that will enable you to create, edit, and manipulate text files. As this is the most obvious of programmers’ needs, you are advised to practice with these tools if you are not already an experienced user. As you progress through the remaining chapters, you should become more knowledgeable about the operating system usage.
This chapter will discuss the most powerful feature of Linux/UNIX, shell scripting. Because scripting is a vast subject, to attempt to cover several scripting languages in one chapter is very ambitious. However, every effort will be made to discuss the most commonly used features of scripting and the scripting languages, as has been done in the previous chapters with respect to the topics discussed therein.
As the word ‘script’ implies, scripts are programs that are interpreted by another program that understands the language syntax used in the script. In the current sense, such a program is known as the shell, as it acts as an intermediate layer between the Linux kernel and the scripts. The shell programs provide an easy interface between the user and the operating system, most specifically while accessing low-level features. Also, shells provide a bridge between two distinctly separate programs. For example, by using shell scripts, an application can be built integrating the functionality of two or more programs (written in different languages) and standard Linux commands. Developing Enterprise-class applications on the Linux operating system involves the integration (or intercommunication) of several (simple and complex) programs and sometimes includes the establishment of interprocess communication protocols between the distributed pieces of the application. The shell scripts make a very powerful connection between the individual pieces of the application, even though efficient interprocess communication is established. The topic of interprocess communication is discussed in Chapter 7, Building Distributed Java Applications, as distributed application development, while the shell scripts are the core topic of this chapter. Although there are many shell-scripting languages in use, the discussion in this book will be focused to a great extent on the bash shell, which is the default shell configured for users on the Red Hat and SuSE Linux systems.
| < Day Day Up > |
|