#!/bin/csh

	foreach f ( `ls | grep B`)
		echo $f
		cd $f
		foreach y ( 2005 2006 2007 2008 2009 2010 2011 )
			if ( -e $f.$y.bsm.level2.tar ) then
				ls -lah $f.$y.bsm.level2.tar
				tar -xf $f.$y.bsm.level2.tar
				if ( -e ._$f.$y.bsm.level2 ) then
					ls -lah ._$f.$y.bsm.level2
				endif
				rm $f.$y.bsm.level2.tar
				tar -cf $f.$y.bsm.level2.tar $f.$y.bsm.level2
			endif
		end
		cd ..
	end
