Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: ChrB
  • Content: Threads
  • Order by date
  1. ChrB

    RegEx meets curly brace } - not

    Hi folks I have - with your help - some code which shortens lines in a file to a specified length MaxLen: k = length while ( k > MaxLen ) { for (m = MaxLen; m > 0; m--) if (substr( $0, m, 1) == " ") break if ( m == 0 ) m = MaxLen print substr($0, 1, m) > Output...
  2. ChrB

    Cut string to xx char, insert newline at nearest space

    I have files with long text strings that need to be cut to a certain length. This is the code I have done so far: 10: MaxLen = 60 # desired length of string 20: LineLen = length($0) 30: if ( length($0) > MaxLen ) { # If $0 >...
  3. ChrB

    SUB-criteria covering two lines ?

    Hi I am new to AWK, on Windows, and need to re-format textfiles like this one: :54:any text on one line :86:this text field co vers two lines or ev en more lines :54:here is another text on one line The result should show all lines beginning with :xx: ; the record starting with :86: should...

Part and Inventory Search

Back
Top