Linux Shell Scripting Solutions [Video]
-
Free ChapterShell Something Out
- Printing in the Terminal
- Playing with Variables and Environment Variables
- Function to Prepend to Environment Variables
- Math with the Shell
- Playing with File Description and Redirection
- Arrays and Associative Arrays
- Visiting Aliases
- Grabbing Information about the Terminal
- Getting and Setting Dates and Delays
- Debugging the Script
- Functions and Arguments
- Reading the Output of a Sequence of Commands
- Reading n Characters without Pressing the Return Key
- Running a Command Until It Succeeds
- Field Separators and Iterators
- Comparisons and Tests
-
Have a Good Command
- Concatenating with cat
- Recording and playingback of terminal sessions
- Finding files and file listing
- Playing with xargs
- Translating with tr
- Checksum and Verification
- Cryptographic Tools and Hashes
- Sorting Unique and Duplicates
- Temporary File Naming and Random Numbers
- Splitting Files and Data
- Slicing Filenames Based on Extension
- Renaming and Moving Files in Bulk
- Spell Checking and Dictionary Manipulation
- Automating Interactive Input
- Making Commands Quicker by Running Parallel Processes
-
File In, File Out
- Generating Files of any Size
- The Intersection and Set Difference (A-B) on Text Files
- Finding and Deleting Duplicate Files
- Working with File Permissions, Ownership, and the Sticky Bit
- Making Files Immutable
- Generating Blank Files in Bulk
- Finding Symbolic Links and Their Targets
- Enumerating File Type Statistics
- Using Loopback Files
- Finding the Difference between Files, Patching
- Using Head and Tail for Printing the Last or First Ten Lines
- Listing Only Directories – Alternative Methods
- Fast Command-Line Navigation Using pushd and popd
- Counting the Number of Lines, Words and Characters in a File
- Printing the Directory Tree
-
Texting and Driving
- Using Regular Expressions
- Searching and mining text inside a file with grep
- Cutting a File Column-Wise with Cut
- Using sed to Perform Text Replacement
- Using awk for Advanced Text Processing
- Finding Frequency of Words Used in a Given File
- Compressing or Decompressing JavaScript
- Merging Multiple Files as Columns
- Printing the nth Word or Column in a File or Line
- Printing Text between Line Numbers or Patterns
- Printing Lines in the Reverse Order
- Parsing E-mail Address and URLs from Text
- Removing a Sentence in a File Containing a Word
- Replacing a Pattern with Text in all Files in a Directory
- Text Slicing and Parameter Operations
-
Tangled Web? Not at All!!
- Downloading from a Web Page
- Downloading a Web Page as Plain Text
- A Primer on cURL
- Parsing Data from a Website
- Image crawler and downloader
- Web photo album generator
- Creating a "define" Utility by Using the Web Backend
- Finding Broken Links in a Website
- Tracking changes to a website
- Posting to a Web Page and Reading Response
-
The Backup Plan
-
The Old-Boy Network
-
Put on the Monitors Cap
- Monitoring Disk Usage
- Calculating the Execution Time for a Command
- Collecting Information about Logged-in Users, Boot Logs, and Boot Failures
- Listing the Top ten CPU Consuming Processes in an Hour
- Monitoring Command Outputs with Watch
- Logging Access to Files and Directories
- Logfile Management with logrotate
- Logging with syslogd
- Monitoring User Logins to Find Intruders
- Remote Disk Usage Health Monitor
- Finding Out Active User Hours on a System
- Measuring and Optimizing Power Usage
- Monitoring Disk Activity
- Checking Disks and Filesystems for Errors
-
Administration Calls
- Gathering Information about Processes
- Killing Processes and Send or Respond to Signals
- Sending Messages to User Terminals
- Gathering System Information
- Using /proc for Gathering Information
- Scheduling with cron
- Writing and Reading the MySQL Database from Bash
- User Administration Script
- Bulk Image Resizing and Format Conversion
- Taking Screenshots from the Terminal
- Managing Multiple Terminals from One
The shell remains one of the most powerful tools on a computer system yet a large number of users are unaware of how much can be accomplished with it. Using a combination of simple commands, you will see how to solve complex problems in day-to-day computer usage.
This video will take you through useful real-world examples to make your daily life easy when working with the shell. It shows you how to effectively use the shell to accomplish complex tasks with ease. Starting with the basics of the shell, you will learn simple commands and their usages, allowing you to perform operations on different kinds of files. We then explain text processing and web interaction, and conclude with backups, monitoring, and other sysadmin tasks.
This is an an excellent guide on solving day-to-day problems using the shell and a few powerful commands together to create solutions.
Style and Approach
This course will take you through useful real-world solutions designed to make your daily life easy when working with the shell.
- Publication date:
- November 2016
- Publisher
- Packt
- Duration
- 8 hours 24 minutes
- ISBN
- 9781787121645