ksh help – hcidbdump cmd

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf ksh help – hcidbdump cmd

  • Creator
    Topic
  • #52397
    Peter Heggie
    Participant

      I can’t seem to get my hcidbdump command to work when generated from a ksh script. It complains about extra characters after the quote. Any clues?

      script:

      HCICMD=”hcidbdump -e -O i”                                              

      echo HCICMD = $HCICMD                                                  

      # if time window specified, calculate start time = current time – window

      if [ $WINFLAG -eq 1 ]                                                  

      then                                                                    

       calc_start_time                                                      

       QUOTE=”””                                                            

       HCICMD=”${HCICMD} -S ${QUOTE}${STARTTIME}${QUOTE}”                    

       echo HCICMD = $HCICMD                                                

      fi                                                                      

                                                                             

      # call hcidbdump command                                                

      ${HCICMD}                                                              

      RC=$?                                                                  

      output:

      HCICMD = hcidbdump -e -O i                                                    

      HCICMD = hcidbdump -e -O i -S “20110406 144002”                                

      Unable to convertclock datestring “20110406: extra characters after close-quote

      command completed with code 64                                                

      If I type that same command I see on the echo statement, it works fine:

      [hci@aixhaserv]:/home/hci/scripts> hcidbdump -e -O i -S “20110406 145628”      

                             C                                                      

                             l T                                                    

                             a y F                                                  

                             s p w                                                  

      Created  Message Id     s e d Prio State Length Source          Dest          



      – – – —-





      18:48:41  [0.0.2089948] E D N 5120   300   1186 grv3_tcp_in     to_lumedx_adtor

      18:47:22  [0.0.2098812] E D N 5120   300   1186 grv3_tcp_in     to_lumedx_adtor

                                                                                   

      Done. 2 messages selected.                                                    

      So I guess its the script, but I’m scratching my head. Is my assignment statement wrong?

      Pete

      Peter Heggie
      PeterHeggie@crouse.org

    Viewing 1 reply thread
    • Author
      Replies
      • #74050
        David Barr
        Participant

          Try replacing the line that says “${HCICMD}” with “eval ${HCICMD}”.

        • #74051
          Peter Heggie
          Participant

            when in doubt, use eval??

            HCICMD = hcidbdump -e -O i                                                    

            HCICMD = hcidbdump -e -O i -S “20110406 154656”                                

                                   C                                                      

                                   l T                                                    

                                   a y F                                                  

                                   s p w                                                  

            Created  Message Id     s e d Prio State Length Source          Dest          



            – – – —-





            18:48:41  [0.0.2089948] E D N 5120   300   1186 grv3_tcp_in     to_lumedx_adtor

            18:47:22  [0.0.2098812] E D N 5120   300   1186 grv3_tcp_in     to_lumedx_adtor

                                                                                         

            Done. 2 messages selected.                                                    

            command completed with code 0                                                  

            thank you! works great!!!!

            its nice to get a quick response too.

            Pete

            Peter Heggie
            PeterHeggie@crouse.org

        Viewing 1 reply thread
        • The forum ‘Cloverleaf’ is closed to new topics and replies.