#!/bin/bash

# This script (which is not strictly necessary to analyze run data)
# goes into each run directory and moves outputs at each temperature
# into their respective T directories.

for t in `cat Tlist` ; do
    Tdir=T_`printf "%04d" $t`
    if [[ ! -e $Tdir ]]; then mkdir $Tdir; fi
done

for i in run* ; do
  for t in `cat Tlist` ; do
    fmt_T=`printf "%04d" $t`
    if [ `ls $i | grep T${fmt_T} | wc -l` -gt 0 ]; then cp -n $i/*_T${fmt_T} T_${fmt_T}; fi 
  done
done
