Hi, I am creating a Korn shell script and need to create an array where each element corresponds to one line of an input file. Being able to do the following would be awesome:
array=( $(cat file.txt) )
However, I'm finding that not all of my development boxes allow this. Some return this:
ksh: syntax error: `(' unexpected
I suspect this has something to do with the Korn shell version. Does anyone know how I can find out what version is required in order to be able to declare arrays, as above? Or is this an OS version issue?
I would really appreciate any tips on how I can find out the minimum requirements for this syntax to be valid.