Here=`pwd` cd $HOME/work/mine/trunk/doc/06/markland cat <names 1.1, Management and Planning of IV&V, 1.2 , Issue and Risk Tracking, 1.3 , Final Report Generation, 1.4 , IV&V Tool Support, 1.5 , Management & Technical Review Support, 1.6 , Criticality Analysis, 2.1 , Reuse Analysis*, 2.2 , Software Architecture Assessment, 2.3 , System Requirements Review, 2.4, Concept Document Evaluation, 2.5, SW/User Requirements Allocation Analysis, 2.6, Traceability Analysis, 3.1, Traceability Analysis - Requirements, 3.2, Software Requirements Evaluation, 3.3, Interface Analysis - Requirements, 3.4, System Test Plan Analysis, 3.5, Acceptance Test Plan Analysis, 3.6, Timing and Sizing Analysis, 4.1, Traceability Analysis - Design, 4.2, Software Design Evaluation, 4.3, Interface Analysis - Design, 4.4, Software FQT Plan Analysis, 4.5, Software Integration Test Plan Analysis, 4.6, Database Analysis, 4.7, Component Test Plan Analysis, 5.1, Traceability Analysis - Code, 5.2, Source Code and Documentation Evaluation, 5.3, Interface Analysis - Code, 5.4, System Test Case Analysis, 5.5, Software FQT Case Analysis, 5.6, SW Integration Test Case Analysis, 5.7, Acceptance Test Case Analysis, 5.8, SW Integration Test Procedure Analysis, 5.9, SW Integration Test Results Analysis, 5.10, Component Test Case Analysis, 5.11, System Test Procedure Analysis, 5.12, Software FQT Procedure Analysis, 6.1 , Traceability Analysis - Test, 6.2, Regression Test Analysis, 6.3, Simulation Analysis, 6.4, System Test Results Analysis, 6.5, Software FQT Results Analysis, 7.1, Operating Procedure Evaluation, 7.2, Anomaly Evaluation, 7.3, Migration Assessment, 7.4, Retirement Assessment, EOF for i in 0 1 2 3 do printf "\n\n----| $i |-------\n\n" silap -n 500 cluster${i}.data433wekaClusteredSorted.csv |tee /tmp/$$ vi /tmp/$$ gawk -F, ' function trim(x) { sub(/^ */,"",x); sub(/ *$/,"",x); return x } Pass==1 { Names[++Names[0]]=$1 } Pass==2 { $1 = trim($1) sub(/\%/,"",$3); Data[$1]=$3 } END { for(i=1; i<=Names[0]; i++) { j= Names[i]; print ","((j in Data) ? Data[j] : 0) }} ' Pass=1 $Here/15.in Pass=2 /tmp/$$ > 15.selected.$i done paste names 15.selected.* | sort -n | gawk -F, ' BEGIN { C[0]=231; C[1]=21; C[2]=148; C[3]=32; for(I in C) All += C[I]; } function str(n,c, s) { while(n--) s = s c; return s } {Sum=0; printf $1 "," $2 for(I=0;I<=3;I++) { One = int(0.5 + 100*$(I+4)*C[I]/All) Sum += One } print ","int(0.5 + Sum/100) "," str(int(Sum/500),"*") } ' | sort -t, -r -n +2 | tee $Here/17.out