Hi folks
I have - with your help - some code which shortens lines in a file to a specified length MaxLen:
Now I recognised that I can not apply this to lines which include a curly brace.
Following the awk man I try a RegEx [tt]/[^}]/ [/tt] or [tt]/[^\}]/[/tt] but nothing happens. How do I exclude lines with a "}" ?
TIA
Chris
I have - with your help - some code which shortens lines in a file to a specified length MaxLen:
Code:
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
$0 = substr($0,m+1)
k -= m
}
Now I recognised that I can not apply this to lines which include a curly brace.
Following the awk man I try a RegEx [tt]/[^}]/ [/tt] or [tt]/[^\}]/[/tt] but nothing happens. How do I exclude lines with a "}" ?
TIA
Chris