I was wondering if ksh supported arrays. I have a script that may work with several hosts. I'd like a means of knowing how many hosts I'm working with and an easy way to access them (as variables) in a loop. I'm assuming there's some kind of foreach in shell scripting.
Yes ksh supports (one-dimensional) arrays.
The internet is awash with info about it
i.e.
Google: ksh arrays
Korn Shell Arrays - Assigning and Accessing Values - Part I
[Chapter 6] 6.3 Arrays
Google: ksh loops