Actually, I'd say that's a fairly clean and clever way to set up a long
awk script without having to worry about weird quoting or readability issues. But it's probably not safe to use unless the heredoc delimiter is also quoted, to disable parameter expansions inside it.
I wouldn't use it unless the script were very long though. And in such cases I'd first try to see if I couldn't do the whole thing in
awk, or set up that part as a stand-alone
awk script and call that, or else just switch to another language like perl.
By the way, please use ***
[code][/code]*** tags around your code and data, to preserve the original formatting and to improve readability. Do
not use quote tags, bolding, colors, "start/end" lines, or other creative techniques. Thanks.