From: Fred Drake Date: Tue, 24 Nov 1998 17:38:49 +0000 (+0000) Subject: Script to convert things like and to &C; and &Cpp;. This is X-Git-Tag: v1.5.2b1~195 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6942e57f87c5821b0f80aed3f7c1ddbe251e9a94;p=python Script to convert things like and to &C; and &Cpp;. This is something that con't be done with the DOM as far as I can tell. --- diff --git a/Doc/tools/sgmlconv/fixgenents.sh b/Doc/tools/sgmlconv/fixgenents.sh new file mode 100755 index 0000000000..220e35669d --- /dev/null +++ b/Doc/tools/sgmlconv/fixgenents.sh @@ -0,0 +1,25 @@ +#! /bin/sh +# +# Script to fix general entities that got translated from the LaTeX as empty +# elements. Mostly pretty bogus, but works like a charm! + +if [ "$1" ]; then + exec <"$1" + shift 1 +fi + +if [ "$1" ]; then + exec >"$1" + shift 1 +fi + +sed ' +s||\&ABC;|g +s||\&ASCII;|g +s||\&C;|g +s||\&Cpp;|g +s||\&EOF;|g +s||\&NULL;|g +s||\&POSIX;|g +s||\&UNIX;|g +' || exit $?