Few questions:
I need table_name[c] value in another variable. for ex:a
SO, if i echo $a , it should give table_name1
if i echo $table_name1 it should give the first table name in the i/p file.
Can't we do it in simple scripting? i mean using loops?
We get asked for dynamic variable names many times a week, but these requests remain ill-considered... How could you even tell how many you had when you were done? How would you use it? And other such questions. It's extremely awkward, error-prone, and insecure in more ways than I can describe in a short post.
In short -- variables don't work that way. Not in shell, not in any other language that springs to mind. Either arrays or simple strings more than suffice for the purpose, that being what they were meant to do.