#!/bin/bash # collects all graphs from subdirectories # run this script from the main directory PLOTS rm -f graphs/* cd testcase ROOT=$(pwd) for CASE in * ; do echo $CASE cd $ROOT/$CASE/variant ls for EXP in * ; do echo $EXP cd $ROOT/$CASE/variant/$EXP pwd ls *.png *.gif for IMG in $(ls *.png *.gif) ; do cp $IMG $ROOT/../graphs/${CASE}_${EXP}_${IMG} done done done # cleanup temporary files cd $ROOT/../graphs rm -f *000*.png clear ls -l