Project

General

Profile

MCProduction » download_all_http.sh

Maletic, Dimitrije, 12 April 2017 08:18

 
1
#To get an index.html:
2

    
3
if [ $# -eq 0 ];
4
  then
5
    echo "No MCSerialNumber supplied"
6
    echo "./download_all_http.sh 35"
7
    exit
8
fi
9

    
10
PADDED_mcserial=`printf "%06d" $1`
11

    
12
rm index.html get_files.tmp
13

    
14
wget http://gfe02.grid.hep.ph.ic.ac.uk:8301/Simulation/MCproduction/000000/000000/$PADDED_mcserial/
15
cat index.html | grep href | grep Down | sed s/"\""/" "/g | awk '{print "wget http://gfe02.grid.hep.ph.ic.ac.uk:8301"$3}' > get_files.tmp
16
chmod a+x get_files.tmp
17
./get_files.tmp
(1-1/5)