blob: 3c7c9b7721fd39fad34d8f8c5c374a25271890c5 (
plain)
1
2
3
4
5
6
7
|
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
}
|