Shell loops, conditions and parsing
Resources
Read or watch:
- Loops sample
- Variable assignment and arithmetic
- Comparison operators
- File test operators
- Make your scripts portable
man or help:
env
cut
for
while
until
if
Learning Objectives
At the end of this project, you are expected to be able to explain to anyone, without the help of Google:
General
- What is the advantage of using
#!/usr/bin/env bash
over#!/bin/bash
- How to use
while
,until
andfor
loops - How to use
if
,else
,elif
andcase
condition statements - How to use the
cut
command - What are files and other comparison operators, and how to use them