Sold out

Linux Command Line and Shell Scripting Bible - 3rd Edition

English · Paperback / Softback

Description

Read more

Talk directly to your system for a faster workflow with automation capabilityLinux 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 advancedWhether 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.

List of contents

Introduction xxxiPart I: The Linux Command Line 1Chapter 1: Starting with Linux Shells 3What Is Linux? 3Looking into the Linux kernel 4The GNU utilities 9The Linux desktop environment 11Linux Distributions 17Summary 21Chapter 2: Getting to the Shell 23Reaching the Command Line 23Accessing CLI via a Linux Console Terminal 25Accessing CLI via Graphical Terminal Emulation 28Using the GNOME Terminal Emulator 29Using the Konsole Terminal Emulator 35Using the xterm Terminal Emulator 41Summary 44Chapter 3: Basic bash Shell Commands 47Starting the Shell 47Using the Shell Prompt 48Interacting with the bash Manual 49Navigating the Filesystem 52Listing Files and Directories 59Handling Files 64Managing Directories 73Viewing File Contents 77Viewing parts of a file 81Summary 83Chapter 4: More bash Shell Commands 85Monitoring Programs 85Monitoring Disk Space 96Working with Data Files 102Summary 111Chapter 5: Understanding the Shell 113Exploring Shell Types 113Exploring Parent and Child Shell Relationships 115Understanding Shell Built-In Commands 125Summary 132Chapter 6: Using Linux Environment Variables 135Exploring Environment Variables 135Setting User-Defined Variables 138Removing Environment Variables 142Uncovering Default Shell Environment Variables 143Setting the PATH Environment Variable 148Locating System Environment Variables 150Learning about Variable Arrays 158Summary 159Chapter 7: Understanding Linux File Permissions 161Linux Security 161Using Linux Groups 172Decoding File Permissions 175Changing Security Settings 179Sharing Files 182Summary 184Chapter 8: Managing Filesystems 187Exploring Linux Filesystems 187Understanding the copy-on-write filesystems 192Working with Filesystems 192Managing Logical Volumes 200Summary 210Chapter 9: Installing Software 211Package Management Primer 211The Debian-Based Systems 212The Red Hat-Based Systems 221Installing from Source Code 228Summary 232Chapter 10: Working with Editors 233Visiting the vim Editor 233Navigating the nano Editor 240Exploring the emacs Editor 242Exploring the KDE Family of Editors 251Exploring the GNOME Editor 260Summary 265Part II: Shell Scripting Basics 267Chapter 11: Basic Script Building 269Using Multiple Commands 269Creating a Script File 270Displaying Messages 272Using Variables 274Redirecting Input and Output 279Pipes 281Performing Math 285Exiting the Script 292Summary 295Chapter 12: Using Structured Commands 297Working with the if-then Statement 297Exploring the if-then-else Statement 300Nesting ifs 301Trying the test Command 304Considering Compound Testing 324Working with Advanced if-then Features 325Considering the case Command 327Summary 329Chapter 13: More Structured Commands 331The for Command 331The C-Style for Command 341The while Command 343The until Command 346Nesting Loops 347Looping on File Data 350Controlling the Loop 351Processing the Output of a Loop 358Practical Examples 359Summary 362Chapter 14: Handling User Input 365Passing Parameters 365Using Special Parameter Variables 371Being Shifty 375Working with Options 376Standardizing Options 387Getting User Input 388Summary 392Chapter 15: Presenting Data 395Understanding Input and Output 395Redirecting Output in Scripts 400Redirecting Input in Scripts 402Creating Your Own Redirection 403Listing Open File Descriptors 408Suppressing Command Output 410Using Temporary Files 411Logging Messages 414Practical Example 416Summary 418Chapter 16: Script Control 419Handling Signals 419Running Scripts in Background Mode 427Running Scripts without a Hang-Up 430Controlling the Job 432Being Nice 436Running Like Clockwork 438Summary 446Part III: Advanced Shell Scripting 447Chapter 17: Creating Functions 449Basic Script Functions 449Returning a Value 453Using Variables in Functions 456Array Variables and Functions 461Function Recursion 464Following a Practical Example 470Summary 474Chapter 18: Writing Scripts for Graphical Desktops 477Creating Text Menus 477Doing Windows 484Getting Graphic 496Summary 504Chapter 19: Introducing sed and gawk 505Manipulating Text 505Getting to know the sed editor 505Getting to know the gawk program 509Commanding at the sed Editor Basics 516Using addresses 518Deleting lines 521Inserting and appending text 523Changing lines 525Transforming characters 527Printing revisited 527Using files with sed 530Summary 533Chapter 20: Regular Expressions 535What Are Regular Expressions? 535Defining BRE Patterns 537Plain text 537Special characters 539Anchor characters 540Extended Regular Expressions 549Regular Expressions in Action 554Summary 560Chapter 21: Advanced sed 561Looking at Multiline Commands 561Holding Space 567Negating a Command 569Changing the Flow 572Replacing via a Pattern 575Placing sed Commands in Scripts 577Creating sed Utilities 579Summary 588Chapter 22: Advanced gawk 591Using Variables 591Working with Arrays 600Using Patterns 602Structured Commands 605Formatted Printing 610Built-In Functions 613User-Defined Functions 617Working through a Practical Example 620Summary 621Chapter 23: Working with Alternative Shells 623What Is the dash Shell? 623The dash Shell Features 624The dash command line parameters 624The dash environment variables 625The dash built-in commands 628Scripting in dash 629Creating dash scripts 629Things that don't work 629The zsh Shell 632Parts of the zsh Shell 632Shell options 632Built-in commands 633Scripting with zsh 638Mathematical operations 639Structured commands 640Functions 641Summary 642Part IV: Creating Practical Scripts 643Chapter 24 Writing Simple Script Utilities 645Performing Archives 645Archiving data files 645Managing User Accounts 656Obtaining the required functions 657Creating the script 665Running the script 671Monitoring Disk Space 673Obtaining the required functions 673Creating the script 676Running the script 677Summary 678Chapter 25: Producing Scripts for Database, Web, and E-Mail 681Using a MySQL Database 681Using MySQL 682Using the database in your scripts 692Using the Web 697Installing Lynx 698The lynx command line 699The Lynx configuration file 700Capturing data from Lynx 701Using E-Mail 704Summary 708Chapter 26: Creating Fun Little Shell Scripts 709Sending a Message 709Understanding the required functions 709Creating the script 712Obtaining a Quote 720Understanding the required functions 720Creating the script 724Generating an Excuse 731Understanding the required functions 732Creating the script 735Summary 737Appendix A: Quick Guide to bash Commands 739Appendix B: Quick Guide to sed and gawk 751Index 763

About the author

Ruchard Blum is a networking computer specialist for the U.S. Department of Defense. He is responsible for managing a 3500+ user network that contains Novell(r), UNIX(r), and Windows(r) servers along with a remote mainframe connectivity. He has managed many types of network monitoring programs and has written network monitoring and client/server programs using C, C++, Java(TM), and C sharp. Blum is also the author of several computer books.

Summary

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.

Product details

Authors Richard Blum, Richard Bresnahan Blum, Christine Bresnahan
Publisher Wiley, John and Sons Ltd
 
Languages English
Product format Paperback / Softback
Released 11.02.2015
 
EAN 9781118983843
ISBN 978-1-118-98384-3
No. of pages 864
Dimensions 190 mm x 238 mm x 40 mm
Series ... Bible
BIBLE
Bible (Wiley)
Subjects Natural sciences, medicine, IT, technology > IT, data processing

UNIX, Linux, Betriebssystem, Shell (EDV), Betriebssystem (EDV) / Linux, Unix / Linux, Windowsprogrammierung, Betriebssysteme / UNIX; Computer-Ratgeber; End-User Computing; Operating Systems / Linux & UNIX

Customer reviews

No reviews have been written for this item yet. Write the first review and be helpful to other users when they decide on a purchase.

Write a review

Thumbs up or thumbs down? Write your own review.

For messages to CeDe.ch please use the contact form.

The input fields marked * are obligatory

By submitting this form you agree to our data privacy statement.