Multi-step command, my dynamic variable is not replaced in second step using the ${xxx} notation.

Hello,

I am trying to test a multi-command script using AWK and command-runner-6.0.40_62.

but it seems that the varibale provided from the first step is not properly evaluated in the second step. What i am doing wrong? question.zip.txt

I have attached the src and the test data in the attached zip (please rename it from txt to zip)

Description

1. in the first commnad/script i am publishing a variable "vpc_system_mac" using the command:


writeDynamicVariable("vpc_system_mac", vpc_system_mac)



2. in the second command/script i try to use the variable in the BEGIN section like:


vpc_system_mac = "${vpc_system_mac}" 


but it seems that the variable is not been replaced with the correct value provided from the previous step? (this was actually the method i was using in the command-runner-v1)

My input.json is:


{
  "steps": [
    [
      {
        "variables": {},
        "path": "input_0_0"
      }
    ],
    [
      {
        "variables": {
          "vpc_system_mac": "00:23:04:ee:be:01"
        },
        "path": "input_1_0"
      }
    ]
  ]
}



I have attached the ind script AND the files of test case (rename it to zip)

Thank you!!



This syntax was replaced the AWK parser v2.


You need to use dynamic("vpc_system_mac") (it's just a function that will retrieve the value of the dynamic variable).


For additional information you can take a look at the multi-step command documentation.