#!/bin/bash

for dir in ./*/
do
	cd $dir
	for subdir in ./*/
	do
		cd $subdir
		pwd
		ls
		cp Sxx/outSpectrum0.pgfplots Sxx_welastic.pgfplots
		cp Syy/outSpectrum0.pgfplots Syy_welastic.pgfplots
		cp Szz/outSpectrum0.pgfplots Szz_welastic.pgfplots
		cp Sxx/outSpectrum2.pgfplots Sxx_inelastic.pgfplots
		cp Syy/outSpectrum2.pgfplots Syy_inelastic.pgfplots
		cp Szz/outSpectrum2.pgfplots Szz_inelastic.pgfplots
		cp SqwSum/outSpectrum3.pgfplots Skw_inelastic.pgfplots
		cp Sxx/outSpectrum9.pgfplots Sxx_inelastic_normalized.pgfplots
		cp Syy/outSpectrum9.pgfplots Syy_inelastic_normalized.pgfplots
		cp Szz/outSpectrum9.pgfplots Szz_inelastic_normalized.pgfplots
		rm -r Sxx
		rm -r Syy
		rm -r Szz
		rm -r SqwSum
		rm -r SqwSumPF
		rm -r SqwSumPFRes
		cd ..
	done
	cd ..
done

