#!/bin/bash # extracts abstracts for list of htm files of the form # 1234/jdm1234.htm # from corresponding .tex files # htmlist must end with a blank line # Note: I removed /jdm/journl from in front of $RD.rdf HTMLIST=`cat htmlist` for ARTICLE in $HTMLIST do ART=`echo $ARTICLE | cut -d"." -f1` AR=`echo $ART | cut -d"/" -f2` # changed by JB because of adding year at beginning ABS=`csplit -k -f $AR.rdf ~/jdm/$ART.tex %begin\{onecolabstract% /end\{onecolabstract/ %xxxxx%` done for RDF in `ls *.rdf00` do RD=`echo $RDF | cut -d"." -f1 ` echo "Abstract:" >> $RD.rdf cat $RDF | grep -v -e " %" -e "onecolabstract" -e "smallskip" -e "medskip" -e "noindent"\ -e "latexonly" >> $RD.rdf rm $RDF done