Linux Shell Scripting Cookbook
Playing with variables and environment variables
Function to prepend to environment variables
Playing with file descriptors and redirection
Grabbing information about the terminal
Getting and setting dates and delays
Reading the output of a sequence of commands in a variable
Reading n characters without pressing the return key
Running a command until it succeeds
Field separators and iterators
Recording and playing back of terminal sessions
Finding files and file listing
Cryptographic tools and hashes
Temporary file naming and random numbers
Slicing filenames based on extension
Renaming and moving files in bulk
Spell checking and dictionary manipulation
Making commands quicker by running parallel processes
The intersection and set difference (A-B) on text files
Finding and deleting duplicate files
Working with file permissions, ownership, and the sticky bit
Generating blank files in bulk
Finding symbolic links and their targets
Enumerating file type statistics
Creating ISO files and hybrid ISO
Finding the difference between files, patching
Using head and tail for printing the last or first 10 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
Searching and mining a 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 the 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 addresses and URLs from text
Removing a sentence in a file containing a word
Replacing a pattern with text in all the files in a directory
Text slicing and parameter operations
Downloading a web page as plain text
Accessing Gmail e-mails from the command line
Creating a "define" utility by using the Web backend
Finding broken links in a website
Posting to a web page and reading the response
Archiving and compressing with zip
Creating filesystems with compression
Version control-based backup with Git
Creating entire disk images using fsarchiver
Listing all the machines alive on a network
Running commands on a remote host with SSH
Transferring files through the network
Connecting to a wireless network
Password-less auto-login with SSH
Mounting a remote drive at a local mount point
Network traffic and port analysis
Sharing an Internet connection
Calculating the execution time for a command
Collecting information about logged in users, boot logs, and boot failures
Listing the top 10 CPU consuming processes in an hour
Monitoring command outputs with watch
Logging access to files and directories
Logfile management with logrotate
Monitoring user logins to find intruders
Remote disk usage health monitor
Finding out active user hours on a system
Measuring and optimizing power usage
Checking disks and filesystems for errors
Gathering information about processes
Killing processes and send or respond to signals
Sending messages to user terminals
Using /proc for gathering information
Writing and reading the MySQL database from Bash
Bulk image resizing and format conversion
Taking screenshots from the terminal