1 Reply Latest reply on Mar 29, 2013 4:44 AM by Siddu angadi

    How to truncate a string variable

      I am trying to cut off the first 6 characters of a string variable but, I cant seem to get anything to work


      I have used:

      blexpr strstr

      blexpr substrt

      blexpr leftc


      right now my code has a while loop that brings in a series of strings variable from a csv file. I need to cut off the first 6 characters of each string (i.e. "HelloWorld" need to become "orld"). My code looks something like



      while read Line
      Group=`echo $Line | cut -d ',' -f1`
      Name=`echo $Line | cut -d ',' -f2`

      groupName=`blexpr 'LEFT ($Group,3)'`

      I know my loop is working correctly, I just can't seem to truncate the string variable