opnsense-src/contrib/one-true-awk/bugs-fixed/getline-corruption.awk
Warner Losh daf917daba Merge one true awk from 2024-01-22 for the Awk Second Edition support
This brings in Unicode support, CSV support and a number of bug fixes.
They are described in _The AWK Programming Language_, Second Edition, by
Al Aho, Brian Kernighan, and Peter Weinberger (Addison-Wesley, 2024,
ISBN-13 978-0138269722, ISBN-10 0138269726).

Sponsored by:		Netflix

(cherry picked from commit f32a6403d3)
2024-03-11 22:53:18 -06:00

5 lines
77 B
Awk

BEGIN {
getline l
getline l
print (s=substr(l,1,10)) " len=" length(s)
}