1 Reply Latest reply on Mar 2, 2011 1:29 AM by Paul Seager-Smith

    Iterating through listAllByGroup

    Eddie Hobson

      I'm trying to list all the jobs in a folder and find the one containing a key word.  The problem is that the job names contain spaces.  Therefore, when I store the job list to a variable and try to loop through it, the foreach command sees each space as a new line.  Any thoughts on storing a list of job names with spaces?






      blcli_execute Job listAllByGroup "/BladeLogic/OS Patching"

      blcli_storeenv JOB_LIST_BATCH



      foreach job in $JOB_LIST_BATCH


      RESULT=`echo $job|grep -i Batch`

      if [ "$RESULT" != "" ]


      echo $job