Oreilly - Bash Scripting Solutions
by Ron Brash, Ganesh Naik | Publisher: Packt Publishing | Release Date: October 2018 | ISBN: 9781789803648
Automate tedious repetitive tasks, manage your system efficiency, and become an effective seasoned Bash userAbout This VideoAutomate tedious and repetitive tasksCreate several novel applications ranging from a simple IRC logger to a Web ScraperManage your system efficiently by becoming a seasoned Bash userIn DetailIn Linux, one of the most commonly used and most powerful tools is the Bash shell. With its collection of engaging recipes, Bash solutions takes you through a series of exercises designed to teach you how to effectively use the Bash shell in order to create and execute your own scripts. The course starts by introducing you to the basics of using the Bash shell, and teaching you the fundamentals of generating any input from a command. With the help of a number of exercises, you will get to grips with automating daily tasks for sysadmins and power users. Once you have a hands-on understanding of the subject, you will move on to exploring more advanced projects that can solve real-world problems comprehensively on a Linux system. In addition to this, you will discover projects such as creating an application with a menu, beginning scripts on startup, parsing and displaying human-readable information, and executing remote commands with authentication using self-generated Secure Shell (SSH) keys. By the end of this course, you will have gained significant experience in solving real-world problems, from automating routine tasks to managing your systems and creating your own scripts.All the code and supporting files for this course are available on Github at https://github.com/PacktPublishing/Bash-Scripting-Solutions-video-
- Chapter 1 : Crash Course in Bash
- The Course Overview 00:03:53
- Getting Started with Bash and CLI Fundamentals 00:09:29
- Creating and Using Basic Variables 00:03:18
- Hidden Bash Variables and Reserved Words 00:02:34
- Conditional Logic Using if, else, and elseif 00:06:46
- Case/Switch Statements and Loop Constructs 00:04:48
- Using Functions and Parameters 00:03:59
- Including Source Files 00:01:50
- Retrieving Return codes and Output 00:03:25
- Getting Program Input Parameters 00:02:35
- Getting Additional Information about Commands 00:01:44
- Chapter 2 : Acting Like a Typewriter and File Explorer
- Striping/Altering /Sorting /Deleting/ Searching Strings with Bash Only 00:09:02
- Using SED and AWK to Remove/Replace Substrings 00:07:54
- Formatting Your Data/Output Using Echo and Printf 00:04:14
- Readying Your Script for Different Languages with Internationalization 00:04:23
- Calculating Statistics and Reducing Duplicates Based on File Contents 00:04:13
- Using File Attributes With Conditional Logic 00:03:21
- Reading Delimited Data and Altered Output Format 00:03:30
- Chapter 3 : Understanding and Gaining File System Mastery
- Viewing Files from Various Angles – Head, Tail, Less, and More 00:04:07
- Creating a Diff of Two Files and Patching 00:04:34
- Creating Symbolic Links and Using Them Effectively 00:03:51
- Crawling Filesystem Directories and Printing a Tree 00:02:32
- Finding and Deleting Duplicate Files or Directories 00:04:16
- Joining and Splitting Files at Arbitrary Positions 00:05:21
- Chapter 4 : Making a Script Behave Like a Daemon
- Running a Program Continuously (Forever) Using Looping Constructs or Recursion 00:04:34
- Keeping Programs/Scripts Running After Logoff 00:03:05
- Invoking Commands When They Require Permissions 00:02:51
- Sanitizing User Input and for Repeatable Results 00:07:08
- Making a Simple Multi-Level User Menu Using Select 00:02:51
- Generating and Trapping Signals for Cleanup 00:02:45
- Using Temporary Files and Lock Files in Your Program 00:02:50
- Leveraging Timeout When Waiting for Command Completion 00:03:41
- Creating a File-in-File-Out Program and Running Processes in Parallel 00:02:54
- Executing Your Script on Startup 00:02:35
- Chapter 5 : Scripts for System Administration Tasks
- Gathering and Aggregating System Information 00:04:36
- Gathering Network Information and Connectivity Diagnostics 00:03:16
- Compressing and Archiving Files 00:04:07
- Rotating Files from RAM to Storage for Log Rotation 00:03:02
- Using Linux IPtables for a Firewall 00:02:42
- Accessing SQL Databases Remotely or Locally 00:03:56
- Creating and Configuring Cron Jobs for Task Scheduling 00:02:38
- Chapter 6 : Scripts for Power Users
- Creating Syslog Entries and Generating an Alarm 00:02:09
- Backing Up and Erasing Media, Disks, and Partitions with DD 00:01:49
- Creating Graphics and Presentations on the CLI 00:03:34
- Browsing the Web from the CLI 00:02:58
- Finding Binary Dependencies 00:01:22
- Fetching Time from Different Locations 00:01:00
- Encrypting/Decrypting Files from a Script 00:01:40
- Chapter 7 : Writing Bash to Win and Profit
- Creating a lame utility HTTP server 00:03:09
- Parsing RSS Feeds and Output HTML 00:00:49
- Scraping the Web and Collecting Files 00:01:29
- Making a Simple IRC Chat Bot Logger 00:00:59
- Blocking IP Addresses from Failed SSH Attempts 00:01:51
- Playing and Managing Audio from Bash 00:01:29
- Creating a Simple NAT and DMZ Firewall 00:01:58
- Parsing a GitHub Project and Generate a Report 00:00:47
- Using Bash Scripts to Monitor udev Input 00:01:08
- Using Bash to Monitor Battery Life and Optimize It 00:02:20
- Using chroot and Restricted Bash Shells to Secure Scripts 00:01:18
- Chapter 8 : Advanced Scripting Techniques
- Calculating and Reducing the Runtime of a Script 00:01:27
- Writing One-Line Conditional Statements and Loops 00:02:04
- Avoiding Command Not Found Warnings/Errors and Improving Portability 00:01:58
- Creating a Config File and Using It in Tandem with Your Scripts 00:01:14
- Improving Your Shell – GCC and Command Line Colors 00:02:01
- Adding Aliases and Altering User Paths/Variables 00:01:03
- Echoing Output to Raw Terminal Devices 00:01:27
- Creating Simple Frontend GUIs for Bash Scripts 00:02:56
- Compiling and Installing Your Own Bash Shell 00:01:52
- Recording Terminal Sessions for Automation 00:01:25
- Writing High-Quality Scripts by Example 00:02:06