21 |
|
echo " in directory : $dataDir" |
22 |
|
echo " to target : $target" |
23 |
|
echo " condor output: $condorOutput" |
24 |
+ |
echo " file range : $first -- $last" |
25 |
|
|
26 |
|
mkdir -p $condorOutput/$book/$dataset |
27 |
|
script=`which downloadFile.sh` |
28 |
|
|
29 |
|
# make sure the request is good |
30 |
< |
nFiles=`wc -l $condorOutput/$book/$dataset/fileList.txt | cut -d ' ' -f` |
30 |
> |
nFiles=`wc -l $condorOutput/$book/$dataset/fileList.txt | cut -d ' ' -f 1` |
31 |
|
if [ $first -gt $nFiles ] || [ $last -gt $nFiles ] |
32 |
|
then |
33 |
|
echo "Request makes no sense: nFiles=$nFile but first=$first and last=$last" |
38 |
|
nFilesPerJob=$(($last - $first + 1)) |
39 |
|
fList=`head -$last $condorOutput/$book/$dataset/fileList.txt | tail -$nFilesPerJob | cut -d' ' -f 2` |
40 |
|
|
41 |
+ |
echo LIST $fList |
42 |
+ |
|
43 |
|
# spread the jobs out by a bit |
44 |
< |
sleep $first |
44 |
> |
#sleep $first |
45 |
|
|
46 |
|
# loop through our list now |
47 |
|
for file in $fList |