#! /bin/gawk -f # Last edited on 2004-01-18 02:02:46 by stolfi # Preprocess Rugg's text: # Convert "." to "_" for consistency with other sample texts. BEGIN { abort = -1; } (abort >= 0) { exit abort; } /^ *[#] *BLANK/ { $0 = "# BLANK = \"_\""; print; next } /^ *([#@]|$)/ { print; next; } /./ { gsub(/[.] *$/, "", $0); gsub(/[.]/, "_", $0); print ; next; } //{ print; } END { if (abort >= 0) { exit abort; } } function arg_error(msg) { printf "%s\n", msg > "/dev/stderr"; printf "usage: %s\n", usage > "/dev/stderr"; abort = 1; exit 1; } function data_error(msg) { printf "line %d: %s\n", FNR, msg > "/dev/stderr"; abort = 1; exit 1; }