Best approach to using KMVAR before filename [SOLVED]

I have this shell script where I need to add a variable right before a file name like this:
$KMVAR_Local__basenameInstagram.png

So the variable is $KMVAR_Local__basename
And the file name is Instagram.png

What would be the best approach to make KM understand what is what?

ChatGPT and Claude recommended this:
${KMVAR_Local__basename}Instagram.png

Is this the best approach? There's also:
"$KMVAR_Local__basename""Instagram.png"

Enclose the variable part in {} like this: ${KMVAR_Local__basename}Instagram.png will work.

1 Like

Thanks!

1 Like