Kevin Pulo wrote on 22/03/10 9:34 PM: > > Or O(n), considering there's a fork in the loop. > > Have I missed something? What's wrong with the ultra-simple: > > n=5; s=""; while [ ${#s} -lt $n ]; do s="$s*"; echo "$s"; done > > ??? Better again. Thanks! In bash [[ ]] doesn't fork. > > Kev.