#! /bin/csh -f # Last edited on 1999-01-06 15:45:25 by stolfi set usage = "$0 [ -title TITLE ] < INFILE.hix > INDEX.html" # Each line of INFILE represents one occurrence of some string # in the text, in the format # # STRING HNUM PATT # 1 2 3 # # See Note-037.txt for explanation of the fields. set title = "Concordance index" while ( ( $#argv >= 1) && ( "x$1" =~ x-* ) ) if ( ( $#argv >= 2) && ( "x$1" == "x-title" ) ) then set title = "$2"; shift; shift; else echo "bad option $1"; echo "usage: ${usage}"; exit 1 endif end # Output the HTML file: set dt = "`date +'%Y-%m-%d %H:%M:%S'`" cat < ${title}

Generated by J. Stolfi on ${dt}


${title}

EOF gawk \ ' /./ { \ str = $1; hpg = $2; pat = $3; \ gsub(/[.]/, " ", str); \ printf "%s\n", hpg, pat, str; \ } \ ' cat <
EOF