awk/testdir/t.roff

24 lines
251 B
Plaintext
Raw Normal View History

2019-06-23 05:13:57 -04:00
NF > 0 {
for (i = 1; i <= NF; i++) {
n = length($i)
if (n + olen >= 60) {
print oline
olen = n
oline = $i
} else {
oline = oline " " $i
olen += n
}
}
}
NF == 0 {
print oline
olen = 0
}
END {
if (olen > 0)
print oline
}