In the first lesson of the previous course, we learned that one of the meanings of the acronym CLI is “Command Language Interpreter.”

A command language is a special kind of programming language through which we can control applications and the system as a whole. Just like Python and other programming languages, we can use Bash to create scripts, set variables, and more. Because it's a language, Bash is far more powerful than a graphical shell.

For example, we can set variables on the command line by assigning values to them. In the command line environment, variables consist entirely of uppercase characters, numbers, and underscores. We can assign any data type to a variable.

In this lesson, you will working with programs and learn about concepts such as environment variables, the PATH variable, as well as how to control the output of commands in the command line interface using flags or options that can modify behavior.

As you work through each concept, you’ll get to apply what you’ve learned from within your browser so that there's no need to use your own machine to do the exercises. The command line environment inside of this course includes answer checking so you can ensure that you've fully mastered each concept before learning the next concept.

Objectives

  • Learn how to set and access bash variables.
  • Learn how to use flags when calling bash functions.

Lesson Outline

1. Setting Variables
2. Accessing Variables
3. Setting Environment Variables
4. Accessing Environment Variables
5. Calling Programs
6. The PATH Variable
7. Flags
8. Combining Flags
9. Long Flags
10. Takeaways