Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Bash variable with {} is not supported #4442

abhishek.s ·

I have a bash script similar to the one below:


touch ${NEW_FILE}_test

Note that I'm using {} to denote the variable name. If the {} is not present, it will consider the variable name as NEW_FILE_test instead of NEW_FILE.

If the same script is used in a Bash step, it will fail since it expects a QuickBuild variable within ${}.

  • solved #2
  • replies 2
  • views 330
  • stars 0
drdt ·

To embed "${stuff}" in a QB script, you need to escape the brackets as follows: "$!{stuff\}".

This is described in the API documentation:

"When enclosed within script markers, any '}' character in the script itself should be escaped, for example:

  • "${ if (stuff) {stuff\} else {stuff\} }"

"Similarly, all sequences of "$!{" will be replaced with "${" without script processing. This provides a means of embedding a literal "${" in the field.

abhishek.s ·

Thanks for the clarification