Created
September 17, 2018 14:20
-
-
Save TakashiHarada/8e1076a28e03412db79dcf72ee10dd4d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n=3 | |
for ((i = 1; i <= 3; ++i)) | |
do | |
sort -n acl_given_latency${i} | awk '{v[i++]=$1;}END {x=int((i+1)/2); if(x<(i+1)/2) print (v[x-1]+v[x])/2; else print v[x-1];}' >> acl_median_latency0 | |
sort -n acl_hikin_latency${i} | awk '{v[i++]=$1;}END {x=int((i+1)/2); if(x<(i+1)/2) print (v[x-1]+v[x])/2; else print v[x-1];}' >> acl_median_latency1 | |
sort -n acl_takeyama_latency${i} | awk '{v[i++]=$1;}END {x=int((i+1)/2); if(x<(i+1)/2) print (v[x-1]+v[x])/2; else print v[x-1];}' >> acl_median_latency2 | |
sort -n acl_sgm_latency${i} | awk '{v[i++]=$1;}END {x=int((i+1)/2); if(x<(i+1)/2) print (v[x-1]+v[x])/2; else print v[x-1];}' >> acl_median_latency3 | |
sort -n acl_swbp_latency${i} | awk '{v[i++]=$1;}END {x=int((i+1)/2); if(x<(i+1)/2) print (v[x-1]+v[x])/2; else print v[x-1];}' >> acl_median_latency4 | |
sort -n acl_proposed_latency${i} | awk '{v[i++]=$1;}END {x=int((i+1)/2); if(x<(i+1)/2) print (v[x-1]+v[x])/2; else print v[x-1];}' >> acl_median_latency5 | |
done | |
paste scale.txt > tmp0 | |
for ((i = 0; i <= 5; ++i)) | |
do | |
paste tmp${i} acl_median_latency${i} > tmp$((i+1)) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment