#!/bin/bash
# 
# Author: Gerard Schaafsma
# Date: 16-12-2013
# Purpose: replace certain values in all files in IDbases

echo $HOME

for d in $(ls)
#<!--<li><a href="../classification.html" title="Classification for immunodeficiencies">Classification</a></li>--><li>
#<!--<li><a href="../structures.html" title=" Protein structures">Structures</a></li>-->
#<!--<li><a href="../../../idr/Immunology.shtml" title="Links to immunology resources">Immunology resources</a></li>-->
#<!--<li><a href="../../../idr/patient_pages.shtml" title="Links to patient's web pages">Patient pages</a></li>-->
#<!--<li><a href="../../../idr/idr_arc.shtml" title="Figure of the IDR architecture">The IDR architecture</a></li>-->
#2014 Protein Structure and Bioinformatics,
do
	echo 'dir is now:'
	echo $d
	for f in $(grep -ilr '2014 Protein Structure and Bioinformatics,' $d)
#	for f in $(grep -ilr '<!--<li><a href="../../../idr/idr_arc.shtml" title="Figure of the IDR architecture">The IDR architecture</a></li>-->' $d)
#	for f in $(grep -ilr 'Patient pages</a></li>-->' $d)
#	for f in $(grep -ilr '<!--<li><a href="../../../idr/Immunology.shtml" title="Links to immunology resources">Immunology resources</a></li>-->' $d)
#	for f in $(grep -ilr '<!--<li><a href="../structures.html" title=" Protein structures">Structures</a></li>-->' $d)
#	for f in $(grep -ilr '<!--<li><a href="../classification.html" title="Classification for immunodeficiencies">Classification</a></li>-->' $d)
#	for f in $(grep -ilr --exclude-dir=restore 'http://structure.bmc.lu.se/idbase/' $d)
	do
		echo $f
		sed -i 's|1999-2010\sIMT\sBioinformatics,|2014 Protein Structure and Bioinformatics,|g' $f
	done
		
done
