debiandoc-sgml/examples/debiandoc2dbk-unent

14 lines
376 B
Bash
Executable File

#!/bin/sh
# vim: set sts=4:
# $ mv FOO.ent FOO-orig.ent
# $ debiandoc2dbk-unent <FOO-orig.ent >FOO.ent
#
# This converts from
# <!ENTITY bogus "XXXXXXXXXXXXXX">
# to
# <!ENTITY bogus "@@@[bogus]@@@">
#
# If you have multiline entities, touch them up first.
#
sed -ne 's/^[ \t]*<!ENTITY[ \t]\+\([^ ]\+\)[ \t].*$/<!ENTITY \1 "@@@[\1]@@@">/pi'