freebsd-nq/contrib/awk/test/psx96sub.awk

8 lines
201 B
Awk
Raw Normal View History

2001-11-02 21:06:08 +00:00
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
}