更新时间:2021-07-23 16:59:26
封面
Title Page
Copyright and Credits
Bash Quick Start Guide
Dedication
Packt Upsell
Why subscribe?
Packt.com
Contributors
About the author
About the reviewers
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Reviews
What is Bash?
What Bash is and is not
Getting Bash
Checking Bash is running
Switching the login shell to Bash
Identifying the Bash version number
Upgrading Bash on macOS X
Understanding Bash features
POSIX shell script features
Bash-specific features
Do I need Bash?
Choosing when to apply Bash
Choosing when to avoid Bash
Getting help with Bash
Summary
Bash Command Structure
Using Bash interactively
Interactive key bindings
Simple commands
Shell metacharacters
Quoting
Escaping
Single quotes
Double quotes
Quote concatenation
Running commands in sequence
Exit values
Stopping a command list on error
Running a command in the background
Essential Commands
Distinguishing command types
Essential Bash builtin commands
The type command
The echo command
The printf command
The pwd command
Tilde paths
The cd command
Changing the directory in scripts
The set command
The declare command
The test [ and [[ commands
Essential system commands
The ls command
Getting filename lists without ls
The mv command
The cp command
The rm and rmdir commands
The grep command
The cut command
The wc command
Getting file sizes with wc or du
The find command
Executing commands for each result
A note about find and xargs
The sort and uniq commands
Input Output and Redirection
Redirecting output
Redirection paths
Avoiding overwrites
Appending to files
Understanding created file permissions
Choosing permissions for created files
Redirecting errors
Combining errors with output
Blocking errors completely
Sending output to more than one place
Redirecting input
Using a long string as input with here-documents
Using pipes
Adding file contents to a stream
Piping output from multiple programs
Filtering programs
The sed stream editor
The AWK programming language
Variables and Patterns