Escaping & in replacement string for gsub and sub does not work properly. I have to write 4 backslashes to get awka to print a literal &. Also if I write \& it will replace it with a number instead of the replacement string. Other than an ugly replacement string, this is also not compatible with gnu awk which will output \& instead of &. In case awka is not installed I default to gawk so it would be very nice if this could be fixed.
Code looks like this:
gsub( /&/, "\\\\&", $i ); awka: & gawk: \&
gsub( /</, "\\\\<", $i ); awka: < gawk: \<
gsub( />/, "\\\\>", $i ); awka: > gawk: \>
version used is 0.7.5