This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
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?

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!