trynew,
Using Case may mean you will have to write long code. If you code checking is as extensive as you suggest, I can't think of another way to do it. A for loop or a while loop will have to contain many if statements. Case seems to me to be the best way to go.
Here is my further explanation...
For case to work any input must be 1 variable string at a time. if you have 1000 variables, you will need 1000 groups of lines in your case statement.
If you are executing a loop to read in data, any data on one line of your input must match a particular case element. Otherwise it will fall out of the case with the *) statement.
If your input file has more than one column, I suggest this. Of course if you have a delimeter, put a -F? after the awk.
cat filename | awk '{ print $1 } >> newfile.out
cat filename | awk '{ print $2 } >> newfile.out
cat filename | awk '{ print $3 } >> newfile.out
cat filename | awk '{ print $4 } >> newfile.out
And so on, until you have cleared all the columns down to only one column. You will need this in for the case to work properly, if I read your data correctly.
You need to change:
word1 word2 word3
word4 word5 word6
Into:
word1
word4
word2
word5
word3
word6.....
This will allow the looping statement to feed into the case statement.
Hope this helps... Please get back with any other info.