Files
sausage/userland/goawk/source/testdata/gawk/posix2008sub.awk
T

8 lines
201 B
Awk

BEGIN {
text = "here is some text"
repl = "<FOO&BAR \\q \\ \\\\ \\& \\\\& \\\\\\&>"
printf "orig = \"%s\", repl = \"%s\"\n", text, repl
sub(/some/, repl, text)
printf "result is \"%s\"\n", text
}