-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript-cp-all-cov.sh
executable file
·45 lines (37 loc) · 1.14 KB
/
script-cp-all-cov.sh
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
#!/bin/bash
#--------------------------------------------------------------------------------
#Arguments
taxa="$1"
if [ "$taxa" == "" ]
then
echo "you did not specify the taxon number!"
echo "exiting..."
exit
fi
part="$2"
if [ "$part" == "" ]
then
echo "you did not specify the partition number!"
echo "exiting..."
exit
fi
#tree_type="$3"
#if [ "$tree_type" == "" ]
#then
# echo "you did not specify the tree type!"
# echo "exiting..."
# exit
#fi
#------------------------------------------------------------------------------------
f=/Users/Olga/Google_Drive/PhD/Projects/terraces/2019.11.Nov/datasets_${taxa}_taxa/part_${part}
ls $f | grep "cov_" | awk -F "cov_${taxa}_" '{print $2}' | while read -r line
do
id=$line
echo "currently copying datasets_${taxa}_taxa/part_$part/cov_${taxa}_${id}..."
file=cov_${taxa}_${id}
f_origin=$f/cov_${taxa}_${id}
f_dest=/Users/Olga/Google_Drive/PhD/Projects/terraces/terrace_analysis/data/datasets_${taxa}_taxa/part_${part}/cov_${taxa}_$id
mkdir -p $f_dest
cp $f_origin/$file $f_dest/
#exit
done