<p><span>Master shell basics and Unix tools and discover easy commands to perform complex tasks with speed </span></p><h4><span>Key Features</span></h4><ul><li><span><span>Learn why the Bash shell is widely used on Linux and iOS </span></span></li><li><span><span>Explore advanced shell concepts, suc
Command Line Fundamentals: Learn to use the Unix command-line tools and Bash shell scripting
β Scribed by Vivek N
- Publisher
- Packt Publishing
- Year
- 2018
- Tongue
- English
- Leaves
- 314
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Synopsis
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.
Table of Contents
- Introduction to the Command Line
- Command Line Building Blocks
- Advanced Command Line Concepts
- Shell Scripting
β¦ Table of Contents
Preface
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
Index
_GoBack
_Hlk523751376
_Hlk524548687
_GoBack
_GoBack
_Hlk525844716
_Hlk526802910
_Hlk525264096
_Hlk526376049
_Hlk527331650
_GoBack
_Hlk528531641
_Hlk531297997
_GoBack
_GoBack
_Hlk531294793
π SIMILAR VOLUMES
<p><span>Master shell basics and Unix tools and discover easy commands to perform complex tasks with speed </span></p><h4><span>Key Features</span></h4><ul><li><span><span>Learn why the Bash shell is widely used on Linux and iOS </span></span></li><li><span><span>Explore advanced shell concepts, suc
<p><span>Master shell basics and Unix tools and discover easy commands to perform complex tasks with speed </span></p><h4><span>Key Features</span></h4><ul><li><span><span>Learn why the Bash shell is widely used on Linux and iOS </span></span></li><li><span><span>Explore advanced shell concepts, suc
null