Module: Loops

Learning Outcomes

How can I perform the same actions on many different files?

To answer this question you will learn to:

  1. Write a loop that applies one or more commands separately to each file in a set of files.

  2. Trace the values taken on by a loop variable during execution of the loop.

  3. Explain the difference between a variable’s name and its value.

  4. Explain why spaces and some punctuation characters shouldn’t be used in filenames.

  5. Save the output from ls to a variable and refer to it in a loop.

  6. Demonstrate how to see what commands have recently been executed.

  7. Re-run recently executed commands without re-typing them.

Readings

Experiential Learning

Assessments

Loops Quiz

Interactive