Key Concepts

Review core concepts you need to learn to master this subject

Bash Scripts

Reusuable sets of bash terminal commands can be created using bash scripts. Bash scripts can run any command that can be run in a terminal.

Bash Scripting In Application
Lesson 1 of 1
  1. 1
    In this lesson, we will explore the potential of Bash scripting. Since we can run any terminal command in a Bash script, there are truly endless possibilities. The ability to execute and link multi…
  2. 2
    Let’s work on a basic script that prints a directory structure in a tree format, which is useful for viewing nested subdirectories. The script takes advantage of the powerful commands that the Linu…
  3. 3
    Let’s continue to work on the script that prints the directory structure tree. At the end of the last exercise, our script was able to print all nested subdirectories and files under a parent direc…
  4. 4
    The script we completed in the last exercise could have been a one-line terminal command run inside the desired working directory: ls -R | grep ‘:$’ | sed -e ‘s/:$//‘ -e ‘s/[^-][^/]*//–/g’ -e ‘s…
  5. 5
    In this exercise, we will be adding script code to build a simple game where the users guess the name of a song when its lyrics are outputted to the terminal. You may be wondering, how do we load i…
  6. 6
    Good job on making it through another bash scripting lesson! We have discussed how powerful bash scripts can be. Anything we can run on a Linux terminal can be run inside a script and vice versa. …

How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory

Pro Logo