[plug] loop statement needed

Leon Brooks leon at brooks.fdns.net
Sat Mar 13 21:19:11 WST 2004


On Wed, 10 Mar 2004 22:49, Jon Miller wrote:
> Does anyone know how to write a loop statement that can write out the
> alphabet.  It needs to increment starting with letter A and
> incrementing by 1 until it gets to the letter Z.

#!/bin/bash
i=A
while [ "$i" != "." ]; do
    echo $i
    i=$(echo $i | tr [A-Z] [B-Z.])
done

Cheers; Leon




More information about the plug mailing list