On Wed, Aug 18, 2021 at 8:26 PM Dusek, Nick via Modules-interest
<mod...@li...> wrote:
[snip]
> How do I instruct Modules to interpolate "$var" to its value of "hello" before exporting the function, rather than exporting it with "$var" verbatim?
Others may have better answers, but to get you moving:
Braces in Tcl act like single quotes in shell scripts, disabling
variable interpolation. You can use
quotes with the caveat that you then need to escape any dollar signs
you use in your shell script.
#%Module 1.0
set var "hello"
set-function greeting "
foo=1
bar=2
echo $var \$foo \$bar
"
|