#!/bin/csh
RM temp
mv mpi-report.idx temp
echo "stripping raw .idx file..."
awk -f aprog temp > mpi-report.idx
echo "now running makeindex..."
makeindex -c mpi-report
RM func-index.tex
RM temp
cp func-index-head.tex temp
cat mpi-report.ind >> temp
awk '/theindex/ { gsub(/theindex/,"myindex")} {print $0}' temp > func-index.tex
RM temp
echo "done"

