0

In my gitlab pipeline I want to execute the following command pattern: command <some-options> --filter 'eq(name,"HMEQ_ABT.flw")'

Instead of static filename: HMEQ_ABT.flw I'd like to use the variable value e.g. $FileName

It should be like:

command <some-options> --filter 'eq(name,"$FileName")'

but $FileName is not substituted with HMEQ_ABT.flw value.

How can insert variable name to get its value instead, please?

Ziggy
  • 19
  • 4
  • You need double quotes instead of single; single quotes preserve everything between them completely verbatim. Then, you need to escape the literal double quotes inside the string. `command --filter "eq(name,\"$FileName\")"` (or `command --filter "eq(name,\" $FileName \")"` if you really want spaces inside the quotes, but that seems implausible, in spite of your examples). – tripleee May 26 '23 at 04:09
  • @tripleee Thanks a lot, I was so close ;) – Ziggy May 26 '23 at 14:39

0 Answers0