Linux Command Line and Shell Scripting Bible, 4th Edition

Book description

Advance your understanding of the Linux command line with this invaluable resource 

Linux Command Line and Shell Scripting Bible, 4th Edition is the newest installment in the indispensable series known to Linux developers all over the world. Packed with concrete strategies and practical tips, the latest edition includes brand-new content covering:

  • Understanding the Shell  
  • Writing Simple Script Utilities  
  • Producing Database, Web & Email Scripts  
  • Creating Fun Little Shell Scripts 

Written by accomplished Linux professionals Christine Bresnahan and Richard Blum, Linux Command Line and Shell Scripting Bible, 4th Edition teaches readers the fundamentals and advanced topics necessary for a comprehensive understanding of shell scripting in Linux. The book is filled with real-world examples and usable scripts, helping readers navigate the challenging Linux environment with ease and convenience. 

The book is perfect for anyone who uses Linux at home or in the office and will quickly find a place on every Linux enthusiast’s bookshelf.

Table of contents

  1. Cover
  2. Title Page
  3. Copyright
  4. Dedication
  5. About the Authors
  6. About the Technical Editor
  7. Acknowledgments
  8. Introduction
    1. Who Should Read This Book
    2. How This Book Is Organized
    3. Minimum Requirements
    4. Where to Go from Here
  9. Part I: The Linux Command Line
    1. CHAPTER 1: Starting with Linux Shells
      1. Investigating Linux
      2. Examining Linux Distributions
      3. Summary
    2. CHAPTER 2: Getting to the Shell
      1. Reaching the Command Line
      2. Accessing CLI via a Linux Console Terminal
      3. Accessing CLI via Graphical Terminal Emulation
      4. Using the GNOME Terminal Emulator
      5. Using the Konsole Terminal Emulator
      6. Using the xterm Terminal Emulator
      7. Summary
    3. CHAPTER 3: Basic Bash Shell Commands
      1. Starting the Shell
      2. Using the Shell Prompt
      3. Interacting with the Bash Manual
      4. Navigating the Filesystem
      5. Listing Files and Directories
      6. Handling Files
      7. Managing Directories
      8. Viewing File Contents
      9. Summary
    4. CHAPTER 4: More Bash Shell Commands
      1. Monitoring Programs
      2. Monitoring Disk Space
      3. Working with Data Files
      4. Summary
    5. CHAPTER 5: Understanding the Shell
      1. Investigating Shell Types
      2. Exploring Parent and Child Shell Relationships
      3. Understanding External and Built-In Commands
      4. Summary
    6. CHAPTER 6: Using Linux Environment Variables
      1. Exploring Environment Variables
      2. Setting User-Defined Variables
      3. Removing Environment Variables
      4. Uncovering Default Shell Environment Variables
      5. Setting the PATH Environment Variable
      6. Locating System Environment Variables
      7. Learning about Variable Arrays
      8. Summary
    7. CHAPTER 7: Understanding Linux File Permissions
      1. Exploring Linux Security
      2. Using Linux Groups
      3. Decoding File Permissions
      4. Changing Security Settings
      5. Sharing Files
      6. Access Control Lists
      7. Summary
    8. CHAPTER 8: Managing Filesystems
      1. Exploring Linux Filesystems
      2. Working with Filesystems
      3. Managing Logical Volumes
      4. Summary
    9. CHAPTER 9: Installing Software
      1. Exploring Package Management
      2. Inspecting the Debian-Based Systems
      3. The Red Hat–Based Systems
      4. Managing Software Using Containers
      5. Installing from Source Code
      6. Summary
    10. CHAPTER 10: Working with Editors
      1. Visiting the vim Editor
      2. Navigating the nano Editor
      3. Exploring the Emacs Editor
      4. Exploring the KDE Family of Editors
      5. Exploring the GNOME Editor
      6. Summary
  10. Part II: Shell Scripting Basics
    1. CHAPTER 11: Basic Script Building
      1. Using Multiple Commands
      2. Creating a Script File
      3. Displaying Messages
      4. Using Variables
      5. Redirecting Input and Output
      6. Employing Pipes
      7. Performing Math
      8. Exiting the Script
      9. Working through a Practical Example
      10. Summary
    2. CHAPTER 12: Using Structured Commands
      1. Working with the if-then Statement
      2. Exploring the if-then-else Statement
      3. Nesting ifs
      4. Trying the test Command
      5. Considering Compound Testing
      6. Working with Advanced if-then Features
      7. Considering the case Command
      8. Working through a Practical Example
      9. Summary
    3. CHAPTER 13: More Structured Commands
      1. Looking at the for Command
      2. Trying the C-Style for Command
      3. Exploring the while Command
      4. Using the until Command
      5. Nesting Loops
      6. Looping on File Data
      7. Controlling the Loop
      8. Processing the Output of a Loop
      9. Working through a Few Practical Examples
      10. Summary
    4. CHAPTER 14: Handling User Input
      1. Passing Parameters
      2. Using Special Parameter Variables
      3. Being Shifty
      4. Working with Options
      5. Standardizing Options
      6. Getting User Input
      7. Working through a Practical Example
      8. Summary
    5. CHAPTER 15: Presenting Data
      1. Understanding Input and Output
      2. Redirecting Output in Scripts
      3. Redirecting Input in Scripts
      4. Creating Your Own Redirection
      5. Listing Open File Descriptors
      6. Suppressing Command Output
      7. Using Temporary Files
      8. Logging Messages
      9. Working through a Practical Example
      10. Summary
    6. CHAPTER 16: Script Control
      1. Handling Signals
      2. Running Scripts in Background Mode
      3. Running Scripts without a Hang-up
      4. Controlling the Job
      5. Being Nice
      6. Running like Clockwork
      7. Working through a Practical Example
      8. Summary
  11. Part III: Advanced Shell Scripting
    1. CHAPTER 17: Creating Functions
      1. Exploring Basic Script Functions
      2. Returning a Value from a Function
      3. Using Variables in Functions
      4. Investigating Array Variables and Functions
      5. Considering Function Recursion
      6. Creating a Library
      7. Using Functions on the Command Line
      8. Working Through a Practical Example
      9. Summary
    2. CHAPTER 18: Writing Scripts for Graphical Desktops
      1. Creating Text Menus
      2. Doing Windows
      3. Getting Graphic
      4. Working Through a Practical Example
      5. Summary
    3. CHAPTER 19: Introducing sed and gawk
      1. Manipulating Text
      2. Looking at the sed Editor Basic Commands
      3. Working Through a Practical Example
      4. Summary
    4. CHAPTER 20: Regular Expressions
      1. Exploring Regular Expressions
      2. Defining BRE Patterns
      3. Trying Out Extended Regular Expressions
      4. Working Through Some Practical Examples
      5. Summary
    5. CHAPTER 21: Advanced sed
      1. Looking at Multiline Commands
      2. Holding Space
      3. Negating a Command
      4. Changing the Flow
      5. Replacing via a Pattern
      6. Placing sed Commands in Scripts
      7. Creating sed Utilities
      8. Working Through a Practical Example
      9. Summary
    6. CHAPTER 22: Advanced gawk
      1. Using Variables
      2. Working with Arrays
      3. Considering Patterns
      4. Structured Commands
      5. Printing with Formats
      6. Using Built‐in Functions
      7. Trying Out User‐Defined Functions
      8. Working Through a Practical Example
      9. Summary
    7. CHAPTER 23: Working with Alternative Shells
      1. Considering the Dash Shell
      2. Looking at the Dash Shell Features
      3. Scripting in Dash
      4. Exploring the zsh Shell
      5. Viewing Parts of the zsh Shell
      6. Scripting with zsh
      7. Working Through a Practical Example
      8. Summary
  12. Part IV: Creating and Managing Practical Scripts
    1. CHAPTER 24: Writing Simple Script Utilities
      1. Performing Backups
      2. Managing Account Deletion
      3. Monitoring Your System
      4. Summary
    2. CHAPTER 25: Getting Organized
      1. Understanding Version Control
      2. Setting Up Your Git Environment
      3. Committing with Git
      4. Summary
  13. APPENDIX A: Quick Guide to Bash Commands
    1. Reviewing Built‐In Commands
    2. Looking at Common Bash Commands
    3. Assessing Environment Variables
  14. APPENDIX B: Quick Guide to sed and gawk
    1. The sed Editor
    2. The gawk Program
  15. Index
  16. End User License Agreement

Product information

  • Title: Linux Command Line and Shell Scripting Bible, 4th Edition
  • Author(s): Richard Blum, Christine Bresnahan
  • Release date: January 2021
  • Publisher(s): Wiley
  • ISBN: 9781119700913