2 ms·
This works too: % cat /tmp/sh var=variables x=$( cat <<EOT This string has 'single' and "double" quotes and can interpolate '$var' EOT
by jfhufl 6y ago
This works too:
% cat /tmp/sh
var=variables
x=$(
cat <<EOT
This string has 'single' and "double" quotes and can interpolate '$var'
EOT
)
echo $x
% bash /tmp/sh
This string has 'single' and "double" quotes and can interpolate 'variables'