Linux Command Line and Shell Scripting Bible

Linux Command Line and Shell Scripting Bible

Christine Bresnahan

Language: English

Pages: 816

ISBN: 111898384X

Format: PDF / Kindle (mobi) / ePub


Talk directly to your system for a faster workflow with automation capability

Linux Command Line and Shell Scripting Bible is your essential Linux guide. With detailed instruction and abundant examples, this book teaches you how to bypass the graphical interface and communicate directly with your computer, saving time and expanding capability. This third edition incorporates thirty pages of new functional examples that are fully updated to align with the latest Linux features. Beginning with command line fundamentals, the book moves into shell scripting and shows you the practical application of commands in automating frequently performed functions. This guide includes useful tutorials, and a desk reference value of numerous examples.

The Linux command line allows you to type specific shell commands directly into the system to manipulate files and query system resources. Command line statements can be combined into short programs called shell scripts, a practice increasing in popularity due to its usefulness in automation. This book is a complete guide providing detailed instruction and expert advice working within this aspect of Linux.

  • Write simple script utilities to automate tasks
  • Understand the shell, and create shell scripts
  • Produce database, e-mail, and web scripts
  • Study scripting examples ranging from basic to advanced

Whether used as a tutorial or as a quick reference, this book contains information that every Linux user should know. Why not learn to use the system to its utmost capability? Linux is a robust system with tremendous potential, and Linux Command Line and Shell Scripting Bible opens the door to new possibilities.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Shells B efore you can dive into working with the Linux command line and shells, it’s a good idea to first understand what Linux is, where it came from, and how it works. This chapter walks you through what Linux is, and explains where the shell and command line fit in the overall Linux picture. IN THIS CHAPTER What Is Linux? Parts of the Linux kernel Exploring the Linux desktop What Is Linux? Visiting Linux distributions If you’ve never worked with Linux before, you may be confused as to

than one shell, although usually they pick one of them to be the default. If your Linux distribution includes multiple shells, feel free to experiment with different shells and see which one fits your needs. The Linux desktop environment In the early days of Linux (the early 1990s) all that was available was a simple text interface to the Linux operating system. This text interface allowed administrators to start programs, control program operations, and move files around on the system. With the

example, after starting a new shell using the bash command, I displayed the current value of the HOME environment variable, which the system sets when I log into the main shell. Sure enough, the value is also available from the child shell process. Local environment variables Local environment variables, as their name implies, can be seen only in the local process in which they are defined. Don’t get confused though about local environment variables, they are just as important as global

scripts for their own use. The bash shell also provides for environment variable arrays. These environment variables can contain multiple values in a single variable. You can access the values either individually by referencing an index value or as a whole by referencing the entire environment variable array name. Finally, the chapter discussed the use of command aliases. While not environment variables, command aliases behave similar to environment variables. They allow you to define an alias

.................................................................................................. 388 Putting it all together ................................................................................................389 Using the select command ........................................................................................390 Adding Color .......................................................................................................................391 The ANSI escape codes

Download sample

Download