I'm running JAVA code inside shell script
java -cp ojdbc6.jar:. javaClassName args
Is it possible to do command substitution for java output inside shell
Output of java code is an array:
[{ID:143},{Name:John},{Age:32},{Designation:Enginner},{City:Delhi},{Phone:+123 456 789},{Email:[email protected]}]
I want to declare above array as variables inside the same shell-script where java code runs
ID=${ID}
Name=${Name}
ID=143Name=JohnAge=32etc. 4. Then re-evaulate the strings or best usedeclareor usereadto read the values into current shell. Utilities liketrsedawkwill be helpful. What have you tried? Are you stuck somewhere?