SitePoint
  • Premium
  • Library
  • Community
  • Jobs
  • Blog
LoginStart Free Trial
Linux Command Line and Shell Scripting Bible, 4th Edition
Linux Command Line and Shell Scripting BIBLE
About the Authors
About the Technical Editor
Acknowledgments
Introduction
Who Should Read This Book
How This Book Is Organized
WARNING
TIP
Minimum Requirements
Where to Go from Here
Part I The Linux Command Line
Investigating Linux
Examining Linux Distributions
Summary
Reaching the Command Line
Accessing CLI via a Linux Console Terminal
Accessing CLI via Graphical Terminal Emulation
Using the GNOME Terminal Emulator
Using the Konsole Terminal Emulator
Using the xterm Terminal Emulator
Summary
Starting the Shell
Using the Shell Prompt
Interacting with the Bash Manual
Navigating the Filesystem
Listing Files and Directories
Handling Files
Managing Directories
Viewing File Contents
Summary
Monitoring Programs
Monitoring Disk Space
Working with Data Files
Summary
Investigating Shell Types
Exploring Parent and Child Shell Relationships
Understanding External and Built-In Commands
Summary
Exploring Environment Variables
Setting User-Defined Variables
Removing Environment Variables
Uncovering Default Shell Environment Variables
Setting the PATH Environment Variable
Locating System Environment Variables
Learning about Variable Arrays
Summary
Exploring Linux Security
Using Linux Groups
Decoding File Permissions
Changing Security Settings
Sharing Files
Access Control Lists
Summary
Exploring Linux Filesystems
Working with Filesystems
Managing Logical Volumes
Summary
Exploring Package Management
Inspecting the Debian-Based Systems
The Red Hat–Based Systems
Managing Software Using Containers
Installing from Source Code
Summary
Visiting the vim Editor
Navigating the nano Editor
Exploring the Emacs Editor
Exploring the KDE Family of Editors
Exploring the GNOME Editor
Summary
Part II Shell Scripting Basics
Using Multiple Commands
Creating a Script File
Displaying Messages
Using Variables
Redirecting Input and Output
Employing Pipes
Performing Math
Exiting the Script
Working through a Practical Example
Summary
Working with the if-then Statement
Exploring the if-then-else Statement
Nesting ifs
Trying the test Command
Considering Compound Testing
Working with Advanced if-then Features
Considering the case Command
Working through a Practical Example
Summary
Looking at the for Command
Trying the C-Style for Command
Exploring the while Command
Using the until Command
Nesting Loops
Looping on File Data
Controlling the Loop
Processing the Output of a Loop
Working through a Few Practical Examples
Summary
Passing Parameters
Using Special Parameter Variables
Being Shifty
Working with Options
Standardizing Options
Getting User Input
Working through a Practical Example
Summary
Understanding Input and Output
Redirecting Output in Scripts
Redirecting Input in Scripts
Creating Your Own Redirection
Listing Open File Descriptors
Suppressing Command Output
Using Temporary Files
Logging Messages
Working through a Practical Example
Summary
Handling Signals
Running Scripts in Background Mode
Running Scripts without a Hang-up
Controlling the Job
Being Nice
Running like Clockwork
Working through a Practical Example
Summary
Part III Advanced Shell Scripting
Exploring Basic Script Functions
Returning a Value from a Function
Using Variables in Functions
Investigating Array Variables and Functions
Considering Function Recursion
Creating a Library
Using Functions on the Command Line
Working Through a Practical Example
Summary
Creating Text Menus
Doing Windows
Getting Graphic
Working Through a Practical Example
Summary
Manipulating Text
Looking at the sed Editor Basic Commands
Working Through a Practical Example
Summary
Exploring Regular Expressions
Defining BRE Patterns
Trying Out Extended Regular Expressions
Working Through Some Practical Examples
Summary
Looking at Multiline Commands
Holding Space
Negating a Command
Changing the Flow
Replacing via a Pattern
Placing sed Commands in Scripts
Creating sed Utilities
Working Through a Practical Example
Summary
Using Variables
Working with Arrays
Considering Patterns
Structured Commands
Printing with Formats
Using Built‐in Functions
Trying Out User‐Defined Functions
Working Through a Practical Example
Summary
Considering the Dash Shell
Looking at the Dash Shell Features
Scripting in Dash
Exploring the zsh Shell
Viewing Parts of the zsh Shell
Scripting with zsh
Working Through a Practical Example
Summary
Part IV Creating and Managing Practical Scripts
Performing Backups
Managing Account Deletion
Monitoring Your System
Summary
Understanding Version Control
Setting Up Your Git Environment
Committing with Git
Summary
Reviewing Built‐In Commands
Looking at Common Bash Commands
Assessing Environment Variables
The sed Editor
The gawk Program
WILEY END USER LICENSE AGREEMENT

Community Questions