Note: Work in progress

Control Statements

Control statements are used to control the flow of a script. In bash, we can use the following control statements:

  • test command
  • if/else/elif
  • []
  • [[]]
  • case
  • For/while/until loops

In this guide, we will explore examples of each.

test command

if/else/elif

[] VS [[]]

case

Loops

For

While

Until