I have a file:
To jest długi string z wieloma polskimi literami ąółżęś kodowany w UTF8,
żeby
było śmieszniej, haha.
ą
a
Example gawk:
gawk '{printf "%-80s %-s\n", $0, length}' file
In gawk, I get the correct result:
To jest długi string z wieloma polskimi literami ąółżęś kodowany w UTF8, 73
żeby 5
było śmieszniej, haha. 22
ą 1
a 1
In gawk, I get the correct result:
Example mawk:
mawk '{printf "%-80s %-s\n", $0, length}' file
To jest długi string z wieloma polskimi literami ąółżęś kodowany w UTF8, 80
żeby 6
było śmieszniej, haha. 24
ą 2
a 1
In mawk, I get the incorrect result:
As mawk get the same result as gawk?