This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Form Variable Name based on the value of another variable in shell script. [ksh]

 
Amit Vinod Dali
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have one requirement as ;



xyz_type_map.properties contains data like;


After line in the above code, i want to store the value the property is based on the variable. solution for line number 03 in the first code snippet.

Is there any other alternative to get the "property value" based on the run time "property name" ?
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see what your problem is, what xyz_type_map.properties has to do with it, and although I don't use ksh, but bash, I suspect your usage of echo is useless.


So property_name and val contain the same content.

What is property value, which influence is '. ${file_loc}/xyz_type_map.properties' supposed to have?

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic