万本电子书0元读

万本电子书0元读

顶部广告

Command Line Fundamentals电子书

售       价:¥

0人正在读 | 0人评论 9.8

作       者:Vivek N

出  版  社:Packt Publishing

出版时间:2018-12-24

字       数:53.0万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(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

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部