/Coursera-DE-C2-Use-Shell-Logic-and-Control-Flow

Use Shell Logic and Control Flow

Primary LanguageShellCreative Commons Zero v1.0 UniversalCC0-1.0

Coursera-DE-C2-Use-Shell-Logic-and-Control-Flow

Use Shell Logic and Control Flow

Goal: Learn to write loops in Bash

Let's practice writing loops in Bash

Part 1: Work with a simple for loop in Bash

  1. Run the following command in your Bash terminal: ./fruitloop.sh
  2. Add another fruit to the loop by editing the file fruitloop.sh in vim or Visual Studio Code
  3. How could extend this loop further?

Part 2: Create ten test files with a Bash Loop

  1. Run the the script ./topten.sh
  2. What happened?
  3. Change the script to create 11 files.
  4. Now write a cleanup script that removes the files using a similar loop