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 and mvel #4543

nini10 ·

Hi,

I tried to run following code on Bash/Shell command step:

#!/bin/bash
arr=(a b c d e)
for (( i=0; i<${#arr[@]}; i++ ))
do
    echo ${arr[$i]}
done

But it failed on mvel error.

Any idea how to handle such code that include "${" in bash script?

  • replies 3
  • views 874
  • stars 0
robinshen ADMIN ·
drdt ·

I always thought you could do that by using "$!{" in place of "${". This is what the online help says:

"Note that all sequences of $!{ will be replaced by ${ without script processing. This provides a means of containing literal ${ in the field."

robinshen ADMIN ·

Thanks for the remind. I did not realize QB already has this.