Blame view

Simulations/extract.sh 862 Bytes
d943e502   Thomas Fitoussi   Update 'analysis'...
1
2
#!/bin/bash

3c65fe50   Thomas Fitoussi   Modification in t...
3
4
5
6
if [ $1 == "dl" ]; then
   scp integral15:~/Results/*.txz . 
fi

d88319ae   Thomas Fitoussi   Update analysis 2...
7
for file in `ls *.txz | awk -F".txz" '{print $1}'`; do 
3c65fe50   Thomas Fitoussi   Modification in t...
8
   tar -xf "$file".txz
d88319ae   Thomas Fitoussi   Update analysis 2...
9

3c65fe50   Thomas Fitoussi   Modification in t...
10
11
12
13
14
15
16
   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}'`
d88319ae   Thomas Fitoussi   Update analysis 2...
17
      DIR=$z"/"$EGMF"-"$L_B"/"
3c65fe50   Thomas Fitoussi   Modification in t...
18
   elif [ $L_B != "lambda_B=1Mpc" ]; then
d88319ae   Thomas Fitoussi   Update analysis 2...
19
      DIR="$z/$L_B/"
3c65fe50   Thomas Fitoussi   Modification in t...
20
21
22
23
24
25
   elif [ $ebl != "Dominguez" ]; then
      DIR="$z/$ebl/"
   elif [ $Emax != "Emax=100TeV" ]; then
      DIR="$z/$Emax/"
   else
      DIR="$z/$EGMF/"
d88319ae   Thomas Fitoussi   Update analysis 2...
26
   fi
3c65fe50   Thomas Fitoussi   Modification in t...
27
   echo "extract $file.txz in $DIR"
d88319ae   Thomas Fitoussi   Update analysis 2...
28
29
   mkdir -p "$DIR"
   mv output/* input_parameters.f95 output.out "$DIR"
3c65fe50   Thomas Fitoussi   Modification in t...
30
   rm -r output $file.txz
d943e502   Thomas Fitoussi   Update 'analysis'...
31
done