I am using ZSH, and I believe I need to use variable expansion to solve my problem, but I'm not entirely sure.
FOOFIELD=1
PROPERTY=FOO
echo ${(P)PROPERTYFIELD}
Expected Result: 1
Current Result: null
What am I doing wrong?
I am using ZSH, and I believe I need to use variable expansion to solve my problem, but I'm not entirely sure.
FOOFIELD=1
PROPERTY=FOO
echo ${(P)PROPERTYFIELD}
Expected Result: 1
Current Result: null
What am I doing wrong?
You can achieve this by executing the below commands
➜ ~ FOOFIELD=1
➜ ~ FOO=11
➜ ~ PROPERTY=FOO
➜ ~ echo ${(P)PROPERTY}
11
➜ ~ echo ${${(P)PROPERTY}FIELD}
1