xref: /freebsd/contrib/one-true-awk/bugs-fixed/space.awk (revision 62cfcf62f627e5093fb37026a6d8c98e4d2ef04c)
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