download_parallel.sh 633 Bytes
Newer Older
Gernot Maier's avatar
Gernot Maier committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
#
# simple script which allows to download
# all particle types simulatenously
#

DD="Prod5_Paranal_AdvancedBaseline_NSB1x"
DL="DL0"
ZE="20deg"

mkdir -p tmp_log

for P in proton gamma_cone gamma_onSource electron
do
     if [[ ${P} == "gamma_cone" ]]; then
         PP="gamma-diffuse"
     elif [[ ${P} == "gamma_onSource" ]]; then
         PP="gamma"
     else
         PP=${P}
     fi

     for A in North South
     do
         rm -f tmp_log/${P}_${A}.log
         ./getRawFilesFromGRID-DIRAC.sh ${DD}/${DD}_${PP}_${A}_${ZE}_${DL}.GRID.list ${DD}/${P}/ 100 &> tmp_log/${P}_${A}.log &
         sleep 10
     done
done