setenv name `echo$m | sed 's/\..*//' | sed 's/.*\// /'`
#echo $name
cat template | sed "s/XXXXX/$name/" > tempfile0;
setenv len `wc oldhtml/$name.html`
#echo $len
unset size
setenv size `echo$len | cut -d " " -f1`
#echo $size
@ size=($size - 10 )
tail -n $size oldhtml/$name.html >> tempfile0
#echo $size
cat tempfile0 | sed "s'cgi-hepdata/2gamma'review-cgi/2gamma'" > tempfile1
cat tempfile1 | sed "s'cgi-hepdata/hepreac'view'" | sed "s'cgi-hepdata/revreac'view'"> tempfile2
cat tempfile2 | sed "s'/cgi-bin/spiface/find/hep/www?rawcmd'href=http://inspirehep.net/search?p'g" | sed "s'\&FORMAT=WWW\&SEQUENCE='\&action_search=Search'g" > tempfile3
cat tempfile3 | sed "s'href=href'\href'g" > $name.shtml
#cat $m | sed "s'/cgi-bin/spiface/find/hep/www?rawcmd'href=http://inspirehep.net/search?p'g" | sed "s'\&FORMAT=WWW\&SEQUENCE='\&action_search=Search'g" > tempfile.shtml
#cat $m | sed "s'/cgi-bin/spiface/find/hep/www\?rawcmd'href=http://inspirehep.net/search?p'g" > tempfile.shtml
#cat $m | sed "s'\&FORMAT=WWW\&SEQUENCE='\&action_search=Search'g" > tempfile.shtml
#cat $m | sed "s'href=href'\href'g" > tempfile.shtml