~q3cpma/misc-tools

ref: 313cd570e4b81c5f6749356698ce617c65181b61 misc-tools/gen_html_entities_htab.sh -rwxr-xr-x 169 bytes
313cd570q3cpma README nit 10 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh
set -eu

tr -d '&":[]{},' | awk '
	BEGIN {print "{0, 0}"}
	$1 ~ /;$/ \
	{
		sub(";$", "", $1)
		printf "%s\t{0x%x, 0x%x}\n",
			$1, $3, (NF == 6 ? $4 : 0)
	}'