Hi,
I want to get a variable's value, and I have its name stored in another
variable:
I need to get the value of FIRST_FOLDER variable:
In bash I would do:
bash-4.2$ export FIRST_FOLDER=path/to/folder
bash-4.2$ export TEMP=FIRST_FOLDER
bash-4.2$ echo ${!FULL_WORD}
path/to/workspace
*Wanted output: path/to/folder*
When I try to do it in Jenkins:
script="""
export FIRST_FOLDER=path/to/folder
export TEMP=FIRST_FOLDER
echo \${!FULL_WORD}
"""
sh script
I get:
script.sh: Bad substitution
Please help
Thanks :)
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/3a226cda-b7bb-45c8-ac91-925b5292acf7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.