> * I can’t seem to find a way to have an incrementing loop counter in rc shell 
> (best I could do is check the size of a growing list variable)

most of the time seq(1), hoc(1) and similar tools can help do the job:

fn square {
        echo $1 '*' $1 | hoc
}

for (i in `{seq 1 10}) {
        j = `{square $i}
        echo $i^² '=' $j
}


> * I couldn’t think of a good way to name the image files so that they can be 
> sorted into the correct sequence as input to togif

awk printf perhaps?

for (i in (0 10 100)) {
        echo $i
} | awk '{printf "image_%0.3d\n", $0}'


Reply via email to