I'm wondering: can gawk printf in any format besides ASCII?
Currently, I'm using gawk match()
to search through some UTF-8 text. When I go ahead and print out the matches gawk finds, it ends up like this:
Chapter 9\n\xE2\x80\x9COh, I Get By with a Little Help from My Friends\xE2\x80\x9D: Short-Term Writing Center/Community Collaborations
When I really want it to look like this:
Chapter 9 “Oh, I Get By with a Little Help from My Friends”: Short-Term Writing Center/Community Collaborations
my code:
gawk '
match($0, /^[\|\+-].*"([^"]+)".*#([[:digit:]]+)/, m) {
print m[2]
}
' file.txt