-
Notifications
You must be signed in to change notification settings - Fork 0
/
SubX_wildcard_delete.sh
79 lines (57 loc) · 1.56 KB
/
SubX_wildcard_delete.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/bash
#remove all copies of extra files
#ETO and soil shortwave radiation (dswrf)
cd /home/kdl/Insync/OneDrive/NRT_CPC_Internship/Data/SubX/GMAO
for f in ETo*.nc4;do
if [[ "${#f}" -gt 19 ]];then
rm "${f}"; fi
done
for f in dswrf*.nc;do
if [[ "${#f}" -gt 24 ]];then
rm "${f}"; fi
done
#EDDI
cd /home/kdl/Insync/OneDrive/NRT_CPC_Internship/Data/EDDI/convert_2_nc
for f in EDDI_ET*.nc4;do
if [[ "${#f}" -gt 28 ]];then
rm "${f}"; fi
done
for f in eddi_mer*.nc4;do
if [[ "${#f}" -gt 16 ]];then
rm "${f}"; fi
done
#SMERGE soil moisture
cd /home/kdl/Insync/OneDrive/NRT_CPC_Internship/Data/SMERGE_SM/Raw_data
for f in 1*.nc4;do
if [[ "${#f}" -gt 13 ]];then
rm "${f}"; fi
done
for f in 2*.nc4;do
if [[ "${#f}" -gt 13 ]];then
rm "${f}"; fi
done
#EDDI.asc files
cd /home/kdl/Insync/OneDrive/NRT_CPC_Internship/Data/EDDI
for f in *.asc;do
if [[ "${#f}" -gt 28 ]];then
rm "${f}"; fi
done
#SMERGE anomalies converted to SubX format
cd /home/kdl/Insync/OneDrive/NRT_CPC_Internship/Data/SMERGE_SM/SM_SubX_values
for f in *.nc4;do
if [[ "${#f}" -gt 31 ]];then
rm "${f}"; fi
done
#MME anomalies (subx)
cd /home/kdl/Insync/OneDrive/NRT_CPC_Internship/Data/SubX/GMAO/anomaly/MME
for f in *.nc4;do
if [[ "${#f}" -gt 32 ]];then
rm "${f}"; fi
done
cd /home/kdl/Insync/OneDrive/NRT_CPC_Internship/Data/SubX/GEFSv12/raw_ensemble_files/cape_sfc
for f in *.nc4;do
if [[ "${#f}" -gt 32 ]];then
rm "${f}"; fi
done
#return to script directory
cd /home/kdl/Insync/OneDrive/NRT_CPC_Internship/Scripts