Learn bash scripting from scratch
4.3 (29 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
6,549 students enrolled

Learn bash scripting from scratch

Learn to automate anything in Linux
4.3 (29 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
6,549 students enrolled
Created by Adriano Gattabuia
Last updated 7/2018
English
English [Auto-generated]
Current price: $11.99 Original price: $19.99 Discount: 40% off
3 days left at this price!
30-Day Money-Back Guarantee
This course includes
  • 2 hours on-demand video
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

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

Try Udemy for Business
What you'll learn
  • You will be able to write your own bash scripts to automate just about anything in Linux
Requirements
  • A PC with Linux installed either as the main OS or in a virtualized environment with VirtualBox or VMWare
  • Basic knowledge of the Linux command line, a free course is available on the Prime Radiant Security YouTube channel
Description

We'll start by setting up a very simple script, then we'll move from there and cover how to deal with variables, functions, conditional statements, loops, arrays and how to manipulate text using sed, awk and regular expressions.

Once covered the fundamentals of the bash scripting language we're going to write three scripts:

  1. A simple universal archive extractor: this script will allow us to extract any compressed archive (tar.gz, 7z, rar, zip, bz, tbz2 and more) just by typing a command. This script will contain no more than 30 lines of code.

  2. A batch renaming tool: the script is going to take the folder to process as an argument, then will batch rename all the files in the folder with a given extension. It will then rename all the files in the folder either with a sequential number or with a user supplied keyword, then a sequential number.

  3. A tool to generate automatic backups based on a schedule: this script is going to generate a tar.gz file by appending the current system date and time to the original folder name provided as an argument, we'll then proceed to use cron jobs to schedule the script execution based on our preference.

By the end of the course you will be able to write scripts on your own to automate anything in Linux.

Who this course is for:
  • Anyone who'd like to learn how to learn bash scripting to automate all sorts of tasks in Linux
Course content
Expand all 12 lectures 01:58:36
+ Bash scripting fundamentals
7 lectures 01:14:05
Functions, command line and function arguments
12:22
Conditional branching: the if/else and case statements
12:52
The while, until and for loops
10:07
Using arrays and looping through them
10:19
Text manipulation with awk, sed and regular expressions
13:59
+ Little bash scripting projects
3 lectures 39:26
Scripting a simple universal archive extractor
06:11
Batch file renaming
20:12
Automatic backups using cron
13:03
+ Course end
1 lecture 02:20
Other references
02:20