xref: /freebsd/contrib/one-true-awk/bugs-fixed/space.awk (revision 6966ac055c3b7a39266fb982493330df7a097997)
1BEGIN {
2	c[" "] = "\" \""
3	c["\a"] = "\\a"
4	c["\b"] = "\\b"
5	c["\f"] = "\\f"
6	c["\n"] = "\\n"
7	c["\r"] = "\\r"
8	c["\t"] = "\\t"
9	c["\v"] = "\\v"
10
11	sort = "LC_ALL=C sort"
12
13	for (i in c)
14		printf("%s %s [[:space:]]\n", c[i],
15			i ~ /[[:space:]]/ ? "~" : "!~") | sort
16
17	for (i in c)
18		printf("%s %s [[:blank:]]\n", c[i],
19			i ~ /[[:blank:]]/ ? "~" : "!~") | sort
20
21	close(sort)
22}
23