-
Notifications
You must be signed in to change notification settings - Fork 0
/
dataExtraction2.sh
24 lines (19 loc) · 1.2 KB
/
dataExtraction2.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
#!/bin/bash
rm my_log.txt x.txt y.txt z.txt data.txt
ns $1 >> my_log.txt
grep -Po 'x = ([-0-9.\n]*[,]*)' $2 | grep -o '[-0-9.]*' >> x.txt
grep -Po 'y = ([-0-9.\n]*[,]*)' $2 | grep -o '[-0-9.]*' >> y.txt
grep -Po 'z = ([-0-9.\n]*[,]*)' $2 | grep -o '[-0-9.]*' >> z.txt
grep -io 'applicationROV Throughput[ ]* : [0-9.]*' my_log.txt | grep -io [0-9.]* >> data.txt
grep -io 'applicationROV PER[ ]* : [-0-9.]*' my_log.txt | grep -io [0-9.]* >> data.txt
grep -io 'applicationCTR Throughput[ ]* : [0-9.]*' my_log.txt | grep -io [0-9.]* >> data.txt
grep -io 'applicationCTR PER[ ]* : [-0-9.]*' my_log.txt | grep -io [0-9.]* >> data.txt
grep -io 'Sent Packets[ ]*: [0-9]*' my_log.txt | grep -io [0-9]* >> data.txt
grep -io 'Received[ ]*: [0-9]*' my_log.txt | grep -io [0-9]* >> data.txt
grep -io 'ROV period[]*: [0-9]*' my_log.txt | grep -io [0-9]* >> data.txt
grep -i 'adaptive' my_log.txt | grep -io [0-9] >> data.txt
grep -i 'constant' my_log.txt | grep -io [0-9] >> data.txt
cp ./x.txt /media/sf_VirtualMachine/Project_Simulation/matlab
cp ./y.txt /media/sf_VirtualMachine/Project_Simulation/matlab
cp ./z.txt /media/sf_VirtualMachine/Project_Simulation/matlab
cp ./data.txt /media/sf_VirtualMachine/Project_Simulation/matlab