There are so many versions of Bash around and it can be frustrating, to me at least, to do some things for not knowing what is available on a given machine. Well here is one, the for loop. Here are a few different ways to do the same thing (and I am sure there are many others) . The first two below work on current linux machines but only the third works on Solaris 5.8’s version of Bash. Enjoy