Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to

Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website

Pass sentence as argument in Process Command

  • I have a simple shell script ( as follow:

    $ cat
    echo "1=$1 2=$2" > /home/ricardo/test1.log

    If I run it in shell with the following arguments, here are the output:

    $ ./ 'This is first sentence' 'This is 2nd sentence'
    $ cat /home/ricardo/test1.log
    1=This is first sentence 2=This is 2nd sentence

    However, if I trigger the same command in Process Command, the output is the following:
    $ cat /home/ricardo/test1.log
    1='This 2=is

    Any idea?


  • I haven't looked at the code for setting the arguments to the process command recently, but it looks from your results as though Mango were splitting the String at spaces before doing whatever magic invokes it.

    The easy workaround is to use something else as your space character, and preferably something with no other regex or shell meaning, and something you're happy enough not to have in your strings. (Consider '%20;' or whatever works)

    For instance,

    result=$(echo $str | sed s/$space/\ /g)
    echo result

  • Thank you for the workaround and I think it will be a good temporary solution.

    Please consider a permanent fix in the next coming release.