Flow Control

Tux

This is post 12 of 19 in the series “[ Shell Scripting ]” The Bourne/bash shell supports a variety of conditionals, loops and other flow control operations. You’ll use these often. if The if statement is a simple conditional. Its syntax is: if condition ; then commands [elif condition ; then commands]… [else commands] fi …

Pipes

Glenn Norman

This is post 10 of 19 in the series “[ Shell Scripting ]” Any number of commands can be pipelined together. command1 | command2 The above command creates a pipe: the standard output of command1 is connected to the standard input of command2. Any command that can accept Standard Input and produce Standard Output is …