#!/bin/bash

INDIRS=( */ )
SUFFIX=gb.dat

for DIR in "${INDIRS[@]%%/}"; do
	LABEL=${DIR}
	for WAVELET in $(basename -s "${SUFFIX}" "${DIR}"/*"${SUFFIX}"); do
		echo ${WAVELET}
		export DIR LABEL WAVELET
		gnuplot plot.txt
	done
done
