This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization 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