-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathiozone_fetch_old_result.sh
executable file
·47 lines (38 loc) · 1.19 KB
/
iozone_fetch_old_result.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
#!/bin/bash
iozone_sp3_gm_ext3="https://w3.suse.de/~rd-qa/Results/ProductTests/SLES-11-SP3/GM/i586/apac2-ph026.apac.novell.com/qa_iozone_bigmem_basic-2015-02-14-11-47-17"
iozone_sp3_gm_xfs="https://w3.suse.de/~rd-qa/Results/ProductTests/SLES-11-SP3/GM/i586/apac2-ph026.apac.novell.com/qa_iozone_bigmem_basic-2015-02-14-16-08-13"
echo "===start==========="
OLD_DIR=../old
if ! [ -d $OLD_DIR ]; then
mkdir $OLD_DIR
fi
for file in `ls result/*`
do
string=$(basename ${file})
echo "========$string=========="
parent=$(basename $(dirname `pwd`))
echo "========$parent=========="
echo $parent | grep '_ext3$'
if [ $? -eq 0 ];then
echo "==ext3==$parent=========="
curl $iozone_sp3_gm_ext3/$string > $OLD_DIR/$string
else
echo "!=ext3==$parent=========="
fi
echo $parent | grep '_xfs$'
if [ $? -eq 0 ];then
echo "==xfs===$parent=========="
curl $iozone_sp3_gm_xfs/$string > $OLD_DIR/$string
else
echo "!=xfs===$parent=========="
fi
done
echo "===end============="
pushd $OLD_DIR
file_list=`ls`
mkdir result
for file in ${file_list}
do
for i in $(cat ${file} | grep -A 6 '^ *KB' |tail -n 6 | awk '{print $3, $4, $5, $6, $7, $8, $9}');do echo $i >> ${OLD_DIR}/result/${file};done
done
popd