Skip to content

AxelKrypton/Bash-lecture

Repository files navigation

Introduction to Bash scripting language

Material relative to a 5-days lecture about Bash scripting language given several times at Goethe University in Frakfurt am Main in the context of the CRC-TR 211 collaboration as well as part of the PUNCH4NFDI young academy. Refer to the lecture table of content to have an overview of the discussed topics.

Slides, exercises and sample solution:

The course has been structured in five lecture sessions, each followed by an exercise session. All material has been here uploaded and you can find here also solutions to the proposed exercises. They are meant as help for the participants, who might want to cross-check their work.

The Iceland bonus track

The Iceland's pictures included in the slides have not been uploaded to keep the repository small. Compilation should not break down, though and placeholder images should be authomatically used. All rights on the pictures in the PDFs are reserved. Feel free to contact me if you wish to make use of any of them.

The beamer theme

The beamer theme used for this lecture has been developed in order to have a simple, but at the same time relaxing and appealing theme. It was inspired by the Code Course theme of a friend, but adapted to the need of having versatile blocks (see varblock environment). Also handy commands to use the four palette colours in the presentation have been added to the theme. The theme has been in the past included in the repository but later moved to an own repository. If you wish to compile LaTeX source code, the TeXnicalities package and the used beamer theme are needed and can be found here.


Table of content

Here you can find the list of the topics discussed in the various days, so that you can directly open the right file if you are looking for a specific argument.

Day 1

  1. Inception and philosophy
  2. Commands and arguments
  3. Strings and types of commands
  4. Quoting and special characters
  5. Variables and special parameters
  6. Shell expansion
  7. Globs and filename expansion

Day 2

  1. Conditional blocks
  2. Loops
  3. Choices
  4. Colours and cursor movements
  5. References and indirect expansion
  6. Arrays and associative arrays
  7. Input and output
  8. Shell options
  9. The GNU core utilities and util-linux
  10. Ready to script!?

Day 3

  1. File descriptors and redirection
  2. Compound commands
  3. Functions
  4. Built in VS external programs
  5. Script autocompletion
  6. GNU Readline

Day 4

  1. Asynchronous commands
  2. Traps
  3. Error handling
  4. Sed (and Awk)

Day 5

  1. Awk (and Sed)
  2. Good practices
  3. Additional useful tools
  4. Bash in real life
  5. Summary of the course
  6. What to do, now?

Material of the lecture

  • Lecture slides

    • Overview
    • Day 1
    • Day 2
    • Day 3
    • Day 4
    • Day 5
  • Exercises

    • Day 1
    • Day 2
    • Day 3
    • Day 4
    • Day 5
  • Sample solutions

    • Day 1
    • Day 2
    • Day 3
    • Day 4
    • Day 5