-
Notifications
You must be signed in to change notification settings - Fork 0
/
splittingABigFileInUnix
92 lines (84 loc) · 7.94 KB
/
splittingABigFileInUnix
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
80
81
82
83
84
85
86
87
88
89
90
91
### ugh. I'm dumb
### GBIF data comes as tab-delimited, but often has commas in which I think throw off programs, so:
### take out commas
sed 's/,//g' insects_world_occurrence.txt > insects_world_occurrenceNoCommas.txt
### split file into ~40 files with about 800,000 lines each so it is more manageable:
sed -n '1,800000p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas1.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas2.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas3.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas4.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas5.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas6.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas7.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas8.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas9.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas10.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas11.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas12.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas13.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas14.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas15.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas16.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas17.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas18.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas19.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas20.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas21.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas22.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas23.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas24.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas25.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas26.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas27.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas28.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas29.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas30.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas31.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas32.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas33.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas34.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas35.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas36.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas37.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas38.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas39.txt
sed -n '1,1p' insects_world_occurrenceNoCommas.txt > insects_world_occurrenceNoCommas40.txt
sed -n '800001,1600000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas2.txt
sed -n '1600001,2400000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas3.txt
sed -n '2400001,3200000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas4.txt
sed -n '3200001,4000000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas5.txt
sed -n '4000001,4800000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas6.txt
sed -n '4800001,5600000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas7.txt
sed -n '5600001,7200000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas8.txt
sed -n '7200001,8000000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas9.txt
sed -n '8000001,8800000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas10.txt
sed -n '8800001,9600000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas11.txt
sed -n '9600001,10400000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas12.txt
sed -n '10400001,11200000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas13.txt
sed -n '11200001,12000000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas14.txt
sed -n '12000001,12800000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas15.txt
sed -n '12800001,13600000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas16.txt
sed -n '13600001,14400000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas17.txt
sed -n '14400001,15200000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas18.txt
sed -n '15200001,16000000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas19.txt
sed -n '16000001,16800000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas20.txt
sed -n '16800001,17600000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas21.txt
sed -n '17600001,18400000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas22.txt
sed -n '18400001,19200000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas23.txt
sed -n '19200001,20000000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas24.txt
sed -n '20000001,20800000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas25.txt
sed -n '20800001,21600000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas26.txt
sed -n '21600001,22400000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas27.txt
sed -n '22400001,23200000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas28.txt
sed -n '23200001,24000000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas29.txt
sed -n '24000001,24800000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas30.txt
sed -n '24800001,25600000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas31.txt
sed -n '25600001,26400000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas32.txt
sed -n '26400001,27200000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas33.txt
sed -n '27200001,28000000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas34.txt
sed -n '28000001,28800000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas35.txt
sed -n '28800001,29600000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas36.txt
sed -n '29600001,30400000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas37.txt
sed -n '30400001,31200000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas38.txt
sed -n '31200001,32000000p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas39.txt
sed -n '32000001,32382024p' insects_world_occurrenceNoCommas.txt >> insects_world_occurrenceNoCommas40.txt