3 Replies Latest reply on Jan 7, 2015 6:53 AM by Bill Robinson

    Function in NSH script with blcli_execute

    Robert Dołęga



      I've notice strange behavior in NSH script using functions with blcli_execute command:


      When I try to execute below script, the execution never ends, and I have to cancel job execution.

      But when I remove comment in red line ( function getGroupID is executing twice) everything looks great.


      blcli_setjvmoption -Djava.security.egd=file:/dev/../dev/urandom

      blcli_setoption authType BLSSO

      blcli_setoption serviceProfileName defaultProfile

      blcli_setoption roleName BLAdmins



      getGroupID () {


        blcli_execute ServerGroup groupNameToId "${path}" > /dev/null 2>&1

        blcli_storeenv NameToId

        echo ${NameToId}



      #getGroupID "${PATH}"  > /dev/null 2>&1


      ID1=$( getGroupID "${PATH}" )

      echo "ID ${ID1}"


      exit 0



      Should I do/set something before executing function in NSH script?