xref: /illumos-gate/usr/src/test/util-tests/tests/awk/gnu/gawksub.awk (revision 0ae0ab6f6ac7a567d495b1daad2f6e229d097a21)
1BEGIN {
2	text = "here is some text"
3	repl = "<FOO&BAR \\q \\ \\\\ \\& \\\\& \\\\\\&>"
4	printf "orig = \"%s\", repl = \"%s\"\n", text, repl
5	sub(/some/, repl, text)
6	printf "result is \"%s\"\n", text
7}
8