Command Line Fundamentals
图书信息
| 作者 | Vivek N |
| 出版社 | Packt Publishing |
| ISBN | 9781789803525 |
| 出版时间 | 2018-12-24 |
| 字数 | 53.0万 |
| 分类 | 进口书,外文原版书,电脑,网络 |
读书简介
Master shell basics and Unix tools and discover easy commands to perform complex tasks with speed Key Features *Learn why the Bash shell is widely used on Linux and iOS *Explore advanced shell concepts, such as pipes and redirection *Understand how to use Unix command-line tools as building blocks for different tasks Book Description The most basic interface to a computer—the command line—remains the most flexible and powerful way of processing data and performing and automating various day-to-day tasks. Command Line Fundamentals begins by exploring the basics, and then focuses on the most common tool, the Bash shell (which is standard on all Linux and iOS systems). As you make your way through the book, you'll explore the traditional Unix command-line programs as implemented by the GNU project. You'll also learn to use redirection and pipelines to assemble these programs to solve complex problems. By the end of this book, you'll have explored the basics of shell scripting, allowing you to easily and quickly automate tasks. What you will learn *Use the Bash shell to run commands *Utilize basic Unix utilities such as cat, tr, sort, and uniq *Explore shell wildcards to manage groups of files *Apply useful keyboard shortcuts in shell *Employ redirection and pipes to process data *Write both basic and advanced shell scripts to automate tasks Who this book is for Command Line Fundamentals is for programmers who use GUIs but want to understand how to use the command line to complete tasks faster.
目录
Preface
About the Book
About the Author
Objectives
Audience
Approach
Hardware Requirements
Software Requirements
Installation and Setup
Guidelines and Tips for using the VM
Installing the Code Bundle
Conventions
Additional Resources
Introduction to the Command Line
Introduction
Command Line: History, Shells, and Terminology
History of the Command Line
Command-Line Shells
Command-Line Terminology
Exploring the Filesystem
Filesystems
Navigating Filesystems
Exercise 1: Exploring Filesystem Contents
Manipulating a Filesystem
Exercise 2: Manipulating the Filesystem
Activity 1: Navigating the Filesystem and Viewing Files
Activity 2: Modifying the Filesystem
Shell History Recall, Editing, and Autocompletion
Command History Recall
Exercise 3: Exploring Shell History
Command-Line Shortcuts
Exercise 4: Using Shell Keyboard Shortcuts
Command-Line Autocompletion
Exercise 5: Completing a Folder Path
Exercise 6: Completing a Command
Exercise 7: Completing a Command using Options
Activity 3: Command-Line Editing
Shell Wildcards and Globbing
Wildcard Syntax and Semantics
Wildcard Expansion or Globbing
Exercise 8: Using Wildcards
Activity 4: Using Simple Wildcards
Activity 5: Using Directory Wildcards
Summary
Command-Line Building Blocks
Introduction
Redirection
Input and Output Streams
Use of Operators for Redirection
Using Multiple Redirections
Heredocs and Herestrings
Buffering
Exercise 9: Working with Command Redirection
Pipes
Exercise 10: Working with Pipes
Text-Processing Commands
Shell Input Concepts
Filtering Commands
Exercise 11: Working with Filtering Commands
Transformation Commands
Exercise 12: Working with Transformation Commands
Activity 6: Processing Tabular Data – Reordering Columns
Activity 7: Data Analysis
Summary
Advanced Command-Line Concepts
Introduction
Command Lists
Command List Operators
Using Multiple Operators
Command Grouping
Exercise 13: Using Command Lists
Job Control
Keyboard Shortcuts for Controlling Jobs
Commands for Controlling Jobs
Regular Expressions
Elements
Quantifiers
Anchoring
Subexpressions and Backreferences
Exercise 14: Using Regular Expressions
Activity 8: Word Matching with Regular Expressions
Shell Expansion
Environment Variables and Variable Expansion
Arithmetic Expansion
Brace Expansion
Recursive Expansion with eval
Command Substitution
Process Substitution
Exercise 15: Using Shell Expansions
Activity 9: String Processing with eval and Shell Expansion
Summary
Shell Scripting
Introduction
Conditionals and Loops
Conditional Expressions
Conditional Statements
Loops
Loop Control
Shell Functions
Function Definition
Function Arguments
Return Values
Local Variables, Scope, and Recursion
Exercise 16: Using Conditional Statements, Loops, and Functions
Shell Line Input
Line Input Commands
Internal Field Separator
Exercise 17: Using Shell Input Interactively
Shell Scripts
Shell Command Categories
Program Launch Process
Script Interpreters
Practical Case Study 1: Chess Game Extractor
Understanding the Problem
Exercise 18: Chess Game Extractor – Parsing a PGN File
Exercise 19: Chess Game Extractor – Extracting a Desired Game
Refining Our Script
Exercise 20: Chess Game Extractor – Handling Options
Adding Features
Exercise 21: Chess Game Extractor – Counting Game Moves
Tips and Tricks
Suppressing Command Output
Arithmetic Expansion
Declaring Typed Variables
Numeric for Loops
echo
Array Reverse Indexing
shopt
Extended Wildcards
man and info Pages
shellcheck
Activity 10: PGN Game Extractor Enhancement
Practical Case Study 2: NYC Yellow Taxi Trip Analysis
Understanding the Dataset
Exercise 22: Taxi Trip Analysis – Extracting Trip Time
Exercise 23: Taxi Trip Analysis – Calculating Average Trip Speed
Exercise 24: Taxi Trip Analysis – Calculating Average Fare
Activity 11: Shell Scripting – NYC Taxi Trip Analysis
Summary
Appendix
Chapter 1: Introduction to the Command Line
Activity 1: Navigating the Filesystem and Viewing Files
Activity 2: Modifying the Filesystem
Activity 3: Command-Line Editing
Activity 4: Using Simple Wildcards
Activity 5: Using Directory Wildcards
Chapter 2: Command-Line Building Blocks
Activity 6: Processing Tabular Data – Reordering Columns
Activity 7: Data Analysis
Chapter 3: Advanced Command-Line Concepts
Activity 8: Word Matching with Regular Expressions
Activity 9: String Processing with eval and Shell Expansion
Chapter 4: Shell Scripting
Activity 10: PGN Game Extractor Enhancement
Activity 11: Shell Scripting – NYC Taxi Trip Analysis
- 502(暂无)
- 侯大利刑侦笔记8:旧案寻踪(集侦查学、痕迹学、社会学、尸体解剖学、犯罪心理学的教科书式破案小说)(读客知识小说文库)(小桥老树)
- Orlando Furioso: Bilingual Edition (English – Italian)(Ludovico Ariosto)
- 欧洲的转折(郭方)
- 2020—2021年中国战略性新兴产业发展蓝皮书(精装版)(中国电子信息产业发展研究院)
- 文治帝国:大宋300年的世运与人物【畅销书《一看就停不下来的中国史》作者重磅新书!】(艾公子)
- 赢在思维——初中化学拉分题专项集训300题(9年级+中考)(彭嘉全)
- 一本书看懂电影之《公民凯恩》(张帆)
