#!/bin/bash if [ $1 == "dl" ]; then scp integral15:~/Results/*.txz . fi for file in `ls *.txz | awk -F".txz" '{print $1}'`; do tar -xf "$file".txz z=`echo $file | awk -F\+ '{print $1}'` EGMF=`echo $file | awk -F\+ '{print $2}'` L_B=`echo $file | awk -F\+ '{print $3}'` ebl=`echo $file | awk -F\+ '{print $4}'` Emax=`echo $file | awk -F\+ '{print $5}'` if [ $z == "simple_case" ] ; then z=`echo $z | awk -F\_ '{print $1" "$2}'` DIR=$z"/"$EGMF"-"$L_B"/" elif [ $L_B != "lambda_B=1Mpc" ]; then DIR="$z/$L_B/" elif [ $ebl != "Dominguez" ]; then DIR="$z/$ebl/" elif [ $Emax != "Emax=100TeV" ]; then DIR="$z/$Emax/" else DIR="$z/$EGMF/" fi echo "extract $file.txz in $DIR" mkdir -p "$DIR" mv output/* input_parameters.f95 output.out "$DIR" rm -r output $file.txz done