#!/bin/sh #set -x ################################################################################ #"@(#)Strip C from a specially formatted HTML-2 document : 1.0 19960517 John S. Urban" # # Make a tool so C source can be maintained as part of a WWW URL in # html format, using a kludge where only lines between special comments are # extracted for compilation. ################################################################################ # extract only lines between lines containing #
## # NOTE: The trailing end of a pair is NOT optional, lines are case sensitive ################################################################################ # find lines in the delimited blocks # delete the delimiting lines themselves exec sed -n -e '\%
%,\%%{ \%
%d \%%d \%%d s%%!% s%<%<% s%>%>% s%\&%\&% s%\"%"% p }' -e '\%