-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathTIDS_data_retrieval_script
executable file
·56 lines (35 loc) · 1.15 KB
/
TIDS_data_retrieval_script
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
# UM
tids=/group_workspaces/jasmin2/tids
cd $tids
echo 'I am now in the top level directory where all of the retrievals will occur from, this is' $PWD
echo ''
outfile=TIDS_files_to_retrieve
echo \#\#\#\#\# > $outfile
#these variables can be defined in (for example) your ~/.bashrc file
echo 'I am now loading the globus directories which I want to retrieve. I have defined these in my ~/.bashrc'
echo ''
. ~/.bashrc
dir[1]=$globus_dir_001
#dir[2]=$globus_dir_002
#dir[3]=$globus_dir_003
#dir[4]=$globus_dir_004
echo 'This is the array of directories which will be retrieved...'
echo ${dir[*]}
echo ''
for i in {1..1}
do
echo 'Now retrieving list from' ${dir[$i]}
echo ''
echo \#\#\#\#\#>> $outfile
echo \#${dir[$i]} >> $outfile
echo \#\#\#\#\#>> $outfile
find ${dir[$i]} -name "[!.]*" -type f >> $outfile
paste $outfile $outfile > 2_column_$outfile
done
mv /group_workspaces/jasmin2/tids/2_column_$outfile ~/scripts/
rm $tids/$outfile
cd ~/scripts
echo 'You can now retrieve the files you want using this command [insert command here!]'
echo ''
echo 'Done. Exiting and returning to your ~/scripts directory.'