7 Replies Latest reply on May 30, 2012 9:44 AM by Bill Robinson

    function for blcli_execute

    Gerardo Bartoccini



      I am troubleshooting a script which contains a function for blcli_execute invokation.

      Basically it builds a string and then passes the string to the blcli_execute command as follows:




           blcli_execute "${BLCLICMD[@]}"



      Now, apparently, this code fails when one of the blcli parameters contains a white space, no matter how I try to escape the quotes.


      I have tried to change the BLCLI string escaping the double quotes, and passing it to the blcli_execute in different ways, but nothing seems to work.

      If I try and print out the BLCLICMD variable just before it gets used by the blcli_execute commqnd, it looks fine:


      PatchAnalysisJob createWindowsPatchAnalysisJob "NSH-PNW-MAYallpatches-v1.0.0 - Analysis Only" "/Development/TJL/CMS_UNIX/Patch Management/Windows/Patch Analysis Jobs" sc000305 /D/Security/Development/Windows/IncludeLists/AprilPatches-99.0.0.txt /D/Security/Development/Windows/ExcludeLists/empty.txt true false false true true


      but just after that the blcli command fails with the following error (in the blcli.log):


      Wrong number of arguments provided to method : createWindowsPatchAnalysisJob expected : 10 received : 16


      Any hints?