for file (Web site management) in fred* doif [ -d $file
for file in fred* doif [ -d $file ]; thenbreak; fidoneecho first directory starting fred was $filerm -rf fred* exit 0The : CommandThe colon command is a null command. It s occasionally useful to simplify the logic of conditions, alias for true. Since it s built-in, :runs faster than true, though its output is also much less readable. You may see it used as a condition for whileloops; while :implements an infinite loop in place common while true. The :construct is also useful in the conditional setting of variables. For example, : ${var:=value} Without the :, the shell would try to evaluate $varas a command. #!/bin/shrm -f fredif [ -f fred ]; then: elseecho file fred did not existfiexit 0continueRather like the C statement of the same name, this command makes the enclosing for, while, or untilloop continue at the next iteration, with the loop variable taking the next value in the list. #!/bin/shrm -rf fred* echo > fred1In some, mostly older shell scripts, you may see the colon used at the start of a lineto introduce a comment, but modern scripts should always use # to start a commentline because this executes more efficiently.