Linux Shell Scripting Solutions
3.4 (8 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
147 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Linux Shell Scripting Solutions to your Wishlist.

Add to Wishlist

Linux Shell Scripting Solutions

Over 110 practical videos on real-world shell problems, guaranteed to make you wonder how you ever lived without them
3.4 (8 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
147 students enrolled
Created by Packt Publishing
Last updated 1/2017
Current price: $12 Original price: $90 Discount: 87% off
4 days left at this price!
30-Day Money-Back Guarantee
  • 8.5 hours on-demand video
  • 1 Supplemental Resource
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion

Training 5 or more people?

Get your team access to Udemy's top 2,000 courses anytime, anywhere.

Try Udemy for Business
What Will I Learn?
  • Explore a variety of regular usage tasks and how they can be made faster using shell commands
  • Write shell scripts that can dig data from the web and process it with a few lines of code
  • Interact with a simple web API from scripts
  • Perform and automate tasks such as automating backups and restoring with archiving tools
  • Create and maintain file/folder archives, compression formats, and encrypting techniques with shell
  • Monitor different activities on the network using logging techniques
View Curriculum
  • This course will take you through useful real-world solutions designed to make your daily life easy when working with the shell.

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.

About The Author

Sarath Lakshman is a 23-year-old who was bitten by the Linux bug during his teenage years. He is a software engineer working for the ZCloud engineering group at Zynga, India. He is a life hacker who loves to explore innovations. He is a GNU/Linux enthusiast and hactivist of free and open source software. He spends most of his time hacking with computers and having fun with his great friends.

Sarath is well known as the developer of SLYNUX (2005)—a user friendly GNU/Linux distribution for Linux newbies. The free and open source software projects he has contributed to are PiTiVi Video editor, SLYNUX GNU/Linux distro, Swathantra Malayalam Computing, School-Admin, Istanbul, and the Pardus Project. He has authored many articles for the Linux For You magazine on various domains of FOSS technologies.

He had made a contribution to several different open source projects during his multiple Google Summer of Code projects. Currently, he is exploring his passion about scalable distributed systems in his spare time. 

Shantanu Tushar has been an advanced GNU/Linux user since his college days. He works as an application developer and contributes to the software in KDE projects. Shantanu has been fascinated by computers since he was a child, and spent most of his high school time writing C code to perform daily activities.

Since he started using GNU/Linux, he has been using shell scripts to make the computer do all the hard work for him. He also takes time to visit students at various colleges to introduce them to the power of free software, including its various tools.

Shantanu is a well-known contributor in the KDE community and works on Calligra, Gluon, and the Plasma subprojects. He looks after maintaining Calligra Active—KDE's office document viewer for tablets, Plasma Media Center, and the Gluon Player. One day, he believes, programming will be so easy that everybody will love writing programs for their computers. 

Who is the target audience?
  • If you are a beginner or an intermediate user who wants to quickly perform scripting tasks, then this video is for you.
Compare to Other Shell Scripting Courses
Curriculum For This Course
113 Lectures
Shell Something Out
16 Lectures 01:07:36

Ability to learn printing text in the terminal is a basic task that most shell scripts and utilities need to perform regularly. 

Preview 06:04

Ability to play with variables used by the shell environment and the operating environment. 

Playing with Variables and Environment Variables

Learn to store a list of paths of where to search for executables, libraries, and so on. 

Function to Prepend to Environment Variables

Learn to explore various methods for performing arithmetic operations in shell. 

Math with the Shell

Learn to shows examples on how to manipulate and redirect with file descriptors. 

Playing with File Description and Redirection

Learn to use arrays and associative arrays which are useful in many types of manipulation where having a string index makes more sense. 

Arrays and Associative Arrays

Learn how to create aliases using the alias command. 

Visiting Aliases

Ability to collect and manipulate terminal settings 

Grabbing Information about the Terminal

Ability to work with dates and time delays. 

Getting and Setting Dates and Delays

Ability to provide certain debugging options that every sysadmin should know. 

Debugging the Script

Learn to know how bash supports to define and to use functions. 

Functions and Arguments

Learn to combine multiple commands and how its output can be read. 

Reading the Output of a Sequence of Commands

Use the read command that provides a way to accomplish this task without having to press return. 

Reading n Characters without Pressing the Return Key

Ability to run a command until it gets succeed. 

Running a Command Until It Succeeds

Discuss delimiters that separate different data elements from single data stream while manipulating text data. 

Field Separators and Iterators

Ability to perform tests that are compatible with the Unix system-level features. 

Comparisons and Tests
Have a Good Command
15 Lectures 01:29:45

Ability to combine standard input data, as well as data from a file using a single-line command. 

Preview 05:30

Using the commands script and Scriptreplay to record the order and timing of the commands and save the data to text files. 

Recording and playing Back of terminal sessions

Ability to deal with most of the common ways to utilize find to locate files. 

Finding files and file listing

Understanding and practice to formulate one-liners for solving text processing problems. 

Playing with xargs

Ability to use tr to perform basic translation between sets. 

Translating with tr

Compute checksums to verify integrity of data. 

Checksum and Verification

Handle cryptographic tools and a general set of algorithms for verifying data integrity. 

Cryptographic Tools and Hashes

Extract unique lines from a text or stdin and illustrate most of the use cases with sort and uniq commands. 

Sorting Unique and Duplicates

Ability to generate standard filenames for temporary data. 

Temporary File Naming and Random Numbers

Understand how to split files in different chunks for generating logs and sending files over e-mail. 

Splitting Files and Data

Perform actions such as renaming the files by preserving the extension and change the extension by preserving the name. 

Slicing Filenames Based on Extension

Ability to write scripts to perform renaming and moving files in bulk. 

Renaming and Moving Files in Bulk

Generate a script which makes use of the dictionary file and the spell checker. 

Spell Checking and Dictionary Manipulation

Ability to deal with commands that read input interactively. 

Automating Interactive Input

Learn to make our commands run faster. 

Making Commands Quicker by Running Parallel Processes
File In, File Out
15 Lectures 57:20

Ability to use general utilities to create lookback filesystem. 

Preview 04:24

Utility to perform a comparison between the two files to arrange the output in such a way that we can perform intersection, difference, and set difference operations. 

The Intersection and Set Difference (A-B) on Text Files

Ability to deal with finding duplicate files and performing operations based on the result. 

Finding and Deleting Duplicate Files

Expand the features of filesystem associated with many types of permissions. 

Working with File Permissions, Ownership, and the Sticky Bit

Ability to make files immutable and make then mutable when required. 

Making Files Immutable

Learn to generate test cases to test programs that operate on thousands of files. 

Generating Blank Files in Bulk

Understand the basic techniques of handling symbolic links. 

Finding Symbolic Links and Their Targets

Generate scripts that can enumerate through many files and collect details. 

Enumerating File Type Statistics

Create logical disks inside a file on your physical disk. 

Using Loopback Files

Illustrate how to generate differences between files highlighted with line numbers. 

Finding the Difference between Files, Patching

Learn to create a new file to open the gedit by using the text editor. 

Using Head and Tail for Printing the Last or First Ten Lines

Ability to handle multiple ways of listing only directories with various useful techniques. 

Listing Only Directories – Alternative Methods

Generate the directory paths in a stack and switch between them using the push and pop operations. 

Fast Command-Line Navigation Using pushd and popd

Ability to use wc to count lines, words, and characters. 

Counting the Number of Lines, Words and Characters in a File

Monitor scripts that help to look at the filesystem using easy-to-read tree representations. 

Printing the Directory Tree
Texting and Driving
15 Lectures 01:06:08

Learn to use regular expression string to match any text according to the context. 

Preview 09:35

Learn how to locate data items of a given specification from a pool of data. 

Searching and mining text inside a file with grep

Extract the name of the students to another file or any nth column in the file, or extract two or more columns. 

Cutting a File Column-Wise with Cut

Utility to play around with regular expressions by using sed techniques. 

Using sed to Perform Text Replacement

Learn to use awk tool which is designed to work with data streams. 

Using awk for Advanced Text Processing

Parse all the words in a given file and then the count of each word which needs to be found. 

Finding Frequency of Words Used in a Given File

Write a JavaScript compressor or obfuscation tool as well as a decompressing tool. 

Compressing or Decompressing JavaScript

Ability to concatenate files by their columns. 

Merging Multiple Files as Columns

Learn to print the nth word or column in a file or line. 

Printing the nth Word or Column in a File or Line

Learn to print a certain section of text lines, based on conditions such as a range of line numbers, and a range matched by a start and end pattern. 

Printing Text between Line Numbers or Patterns

Learn to print the lines of text in a file in reverse order. 

Printing Lines in the Reverse Order

Ability to parse e-mail addresses from a contact list of an e-mail client, which is composed of many unwanted characters and words. 

Parsing E-mail Address and URLs from Text

Learn to remove a sentence in a file containing a word. 

Removing a Sentence in a File Containing a Word

Ability to replace a particular text with a new text in every file in a directory. 

Replacing a Pattern with Text in all Files in a Directory

Learn the simple text-replacement techniques and parameter expansion Short hands available in Bash. 

Text Slicing and Parameter Operations
Tangled Web? Not at All!!
10 Lectures 30:14

Ability to download a file or a web page from a given URL. 

Preview 05:15

Ability to download a web page as plain text. 

Downloading a Web Page as Plain Text

Learn to list most of the important features of cURL. 

A Primer on cURL

Learn to parse the same data by using text-processing tools. 

Parsing Data from a Website

Generate a script to parse the image files and download them automatically. 

Image crawler and downloader

Ability to generate web photo album. 

Web photo album generator

Learn to use one API and see how to write a define script. 

Creating a "define " Utility by Using the Web Backend

Learn to find the broken links by using HTTP manipulation tools. 

Finding Broken Links in a Website

Ability to write a basic tracker for the website changes. 

Tracking changes to a website

Learn to post a web page and reading the response. 

Posting to a Web Page and Reading Response
The Backup Plan
9 Lectures 43:04

Learn how to create archives using tar. 

Preview 10:42

Learn to to store files and directories in a file with attributes such as permissions, ownership. 

Archiving with cpio

Ability to create a tar archive and compress it with gzip and then see how to operate with gzip. 

Compressing data with gzip

Learn to use zip to perform compression and extraction. 

Archiving and Compressing with Zip

Learn to decrease overall time taken to compress your files. 

Faster Archiving with pbzip2

Ability to create a file system with compression by using squashfs command 

Creating filesystems with Compression

Working with rsync to compares the files in the original and destination locations and will only copy the files that are newer. 

Backup Snapshots with rsync

Use Git for the backup of regular files in a non-programming context. 

Version Control-Based Backup with Git

Ability to create disk images by using fsarchive to archive the filesystem data. 

Creating entire disk images using fsarchiver
The Old-Boy Network
8 Lectures 36:42

ping is the most basic network command every user should first know and is available on all major operating systems. ping is a diagnostic tool used for verifying the connectivity between two hosts on a network. Let’s see how to use ping. 

Preview 04:53

When we deal with a large local area network, we may need to check the availability of other machines in the network. By using shell scripting, we can easily find out and report which machines are alive on the network. 

Listing All the Machines Alive on a Network

SSH is an interesting system administration tool that gives you access to a shell on a remote computer which you can use to run commands. 

Running Commands on a Remote Host with SSH

The major driver for networking of computers is resource sharing, and file sharing is the most prominent shared resource. Let’s explore the different methods by which we can transfer files between different nodes on a network. 

Transferring Files through the Network

Providing passwords in automated scripts is impractical, so we need to automate logins. 

Password-Less Auto-Login with SSH

With Port forwarding , you can enable other computers to connect to a particular service on a remote server using your machine. Having a local mount point to access the remote host filesystem is helpful while carrying out both read and write data transfer operations. Let's find out how to do all of this. 

Port Forwarding and Mounting Remote Drives

Network ports are essential parameters of network-based applications. This video discusses various utilities for port analysis. 

Network Traffic and Port Analysis

Even though we have prebuilt tools for defined operations such as file transfer and remote shells, we will need to do a customized network operation in some cases. 

Creating Arbitrary Sockets
Put on the Monitors Cap
14 Lectures 54:39

Illustrate various commands used for disk manipulations with a variety of options. 

Preview 10:17

Learn to calculate the execution time for a command. 

Calculating the Execution Time for a Command

Ability to add a few commands which is used to gather information about a live machine. 

Collecting Information about Logged-in Users, Boot Logs, and Boot Failures

Identify the processes that keep the CPU busy all the time and troubleshoot them to efficiently use the CPU. 

Listing the Top ten CPU Consuming Processes in an Hour

Learn to watch the growth of the file size. In order to do that, we can use the watch command to execute the du command and output repeatedly. 

Monitoring Command Outputs with Watch

Ability to describe how to log such accesses. 

Logging Access to Files and Directories

Learn to debug issues as well as provide statistics on the live machine. 

Logfile Management with logrotate

Learn to make use of syslogd for logging information from a shell script. 

Logging with syslogd

Ability to monitor user logins to find intruders. 

Monitoring User Logins to Find Intruders

Illustrate how to write a monitoring script that can collect details from remote machines in a network. 

Remote Disk Usage Health Monitor

Generate a report with the details, such as rank, user, first logged in date, last logged in date, number of times logged in, and total usage hours. 

Finding Out Active User Hours on a System

Learn to measure and optimize power usage. 

Measuring and Optimizing Power Usage

Ability to monitor the disk activity by using monitoring tools. 

Monitoring Disk Activity

Ability to monitor the consistency of data stored on physical media. 

Checking Disks and Filesystems for Errors
Administration Calls
11 Lectures 57:40

Learn how to gather information about processes. 

Preview 15:04

Learn to introduce the signals and their usage. 

Killing Processes and Send or Respond to Signals

Ability to send messages to user terminals. 

Sending Messages to User Terminals

Ability to show you different sources in a Linux system to gather information about the system. 

Gathering System Information

Learn to provide an interface to read several system parameters from the user space. 

Using /proc for Gathering Information

Learn to write a cron entry and schedule the download, you can also schedule to drop the Internet connection automatically and shutdown the system when the free usage hours end. 

Scheduling with cron

Learn to to read and write to the MySQL database from Bash. 

Writing and Reading the MySQL Database from Bash

Ability to write a user management tool that can handle different function. 

User Administration Script

Learn to use scripts for image management. 

Bulk Image Resizing and Format Conversion

Learn to take screenshots from a terminal when a particular event happens, to figure out what is going on in a GUI application. 

Taking Screenshots from the Terminal

Ability to achieve multiple shells while avoiding problems. 

Managing Multiple Terminals from One
About the Instructor
Packt Publishing
3.9 Average rating
8,274 Reviews
59,187 Students
687 Courses
Tech Knowledge in Motion

Packt has been committed to developer learning since 2004. A lot has changed in software since then - but Packt has remained responsive to these changes, continuing to look forward at the trends and tools defining the way we work and live. And how to put them to work.

With an extensive library of content - more than 4000 books and video courses -Packt's mission is to help developers stay relevant in a rapidly changing world. From new web frameworks and programming languages, to cutting edge data analytics, and DevOps, Packt takes software professionals in every field to what's important to them now.

From skills that will help you to develop and future proof your career to immediate solutions to every day tech challenges, Packt is a go-to resource to make you a better, smarter developer.

Packt Udemy courses continue this tradition, bringing you comprehensive yet concise video courses straight from the experts.