Introduction to Bash Scripting

Last Update July 12, 2024
4 already enrolled

About This Course

In this class we start learning Bash scripting. No previous programming knowledge is required.

I expect you will have questions and require clarification, head over to our facebook group: Learning Linux

I deliver this class in a unique format. Look at the attached file in Class Project, you will see a
This is the only file you need. It contains all the information you need and examples are integrated into it.
If you are new to emacs and org mode head over here and watch Why learn emacs and Install Org Mode

Video lessons goes as follow:

  1. Quick introduction
  2. About
    Why did I choose to deliver this class with org
  3. Special character
    We cover Comments, command separator and the difference between single and double quote.
  4. Bash variable
    How do we declare and use variable
  5. Functions
    How do we declare and call functions. Including passing arguments to functions.
  6. Functions return
    What can be return from a function.
  7. Declare statement
    We look into the details of the declare statement.
  8. If statement
    Here we first look at the if statement, its structure and some example.
  9. If test on file
    Now we look at using the if statement to make some test on files, Does the file exists? Is it a directory? We quickly look through the full list of test that can be performed on files.
    It help to follow this video if you have a clear understanding of what files are in Linux. For more details head over HERE for a short class on the subject.
  10. Next we look at more common way of doing test, ( < > <= … ) but also how the test works with different types of brackets.
  11. For loops
  12. While and Until loops
  13. Input redirection
    A loop can be control by redirecting the input from a file or another process.
  14. Break & Continue
    Here we have a look at the break and continue and their different behavior depending on the loop.
  15. Command line arguments.
    first look at parsing command line argument to your scripts.
  16. How to implement Linux Style arguments in your scripts
    There are 3 common ways of doing so:

    1. Space separated
    2. = separated
    3. with getopts ( 2 Parts video, usage & errors)
  17. How to create menus with SELECT builtin.
  18. The Project


22 Lessons1h 20m

Introduction to Bash Scripting

About notes-org00:00:37
3. Special characters00:03:22
4. Bash variables00:01:29
5. Functions00:02:15
6. Function return00:02:57
7. Declare statement00:04:01
8. If statement00:04:26
9. If test on files00:02:41
10. Binary comparison00:03:05
11. If with brackets00:04:27
12. For Loop00:02:14
13. While & Until loop00:01:59
14. Input redirection00:02:54
15. Break & Continue00:03:51
16. Command Lines arguments00:01:46
17. Linux style args Part 1 (Space separated)00:03:48
18. Linux style args Part 2 (= separated)00:01:26
19. Linux style args Part 3.1 (getopts)00:04:56
20. Linux style args Part 3.2 (getopts error)00:04:26
21. Create menus with SELECT00:04:38
22. The project00:02:47
AssignmentsProject Instructions

Your Instructors


129 Courses
22 Reviews
360 Students
See more

Write a review

Select the fields to be shown. Others will be hidden. Drag and drop to rearrange the order.
  • Image
  • SKU
  • Rating
  • Price
  • Stock
  • Availability
  • Add to cart
  • Description
  • Content
  • Weight
  • Dimensions
  • Additional information
Click outside to hide the comparison bar