Jump to content
Macro Express Forums

iMacro

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by iMacro

  1. #
    # CMP 145
    CMP 4 1.9788189 5.0909448 90 N R126 Flash_Parallel_256_12345567690 ;0=1,1=0.0050
    TOP 0 1.9788189 5.1115948 90 N 300 1 R126-1
    TOP 1 1.9788189 5.0702948 90 N 812 1786 R126-2
    #
    # CMP 146
    CMP 4 1.9581688 4.9531495 180 N R125 res_Parallel_6_12345567690 ;0=1,1=0.0050
    TOP 0 1.9788188 4.9531495 180 N 295 1 R125-1
    TOP 0 1.9788188 4.9531495 180 N 295 1 R125-1

    TOP 1 1.9375188 4.9531495 180 N 812 1785 R125-2

     

    I have a 6000 line text file.

    I need to truncate the length of the bold strings to 20 characters.

    This string always starts after the 6th <space> and ends after the 7th <space> of the line, and the preceeding line always starts with "# CMP" and nowhere else in the txt file

    Is this doable?

     

     

    The resulting file would look like:

    #
    # CMP 145
    CMP 4 1.9788189 5.0909448 90 N R126 Flash_Parallel_256_1 ;0=1,1=0.0050
    TOP 0 1.9788189 5.1115948 90 N 300 1 R126-1
    TOP 1 1.9788189 5.0702948 90 N 812 1786 R126-2
    #
    # CMP 146
    CMP 4 1.9581688 4.9531495 180 N R125 res_Parallel_6_12345 ;0=1,1=0.0050
    TOP 0 1.9788188 4.9531495 180 N 295 1 R125-1
    TOP 0 1.9788188 4.9531495 180 N 295 1 R125-1

    TOP 1 1.9375188 4.9531495 180 N 812 1785 R125-2

     

     

×
×
  • Create New...