. sandbox cat < freqall.dat 1.6 , Criticality Analysis,100,******************** 1.5 , Management & Technical Review Support,100,******************** 1.1, Management and Planning of IV&V,100,******************** 1.4 , IV&V Tool Support,96,******************* 1.3 , Final Report Generation,96,******************* 1.2 , Issue and Risk Tracking,96,******************* 3.1, Traceability Analysis - Requirements,90,****************** 6.1 , Traceability Analysis - Test,88,***************** 4.4, Software FQT Plan Analysis,88,***************** 5.10, Component Test Case Analysis,81,**************** 5.1, Traceability Analysis - Code,81,**************** 4.1, Traceability Analysis - Design,81,**************** 2.1 , Reuse Analysis*,71,************** 3.2, Software Requirements Evaluation,54,********** 2.3 , System Requirements Review,54,********** 5.3, Interface Analysis - Code,53,********** 5.2, Source Code and Documentation Evaluation,53,********** 3.3, Interface Analysis - Requirements,53,********** 3.4, System Test Plan Analysis,50,********* 2.2 , Software Architecture Assessment,50,********* 4.6, Database Analysis,35,******* 4.2, Software Design Evaluation,31,****** 6.5, Software FQT Results Analysis,26,***** 6.4, System Test Results Analysis,26,***** 5.5, Software FQT Case Analysis,26,***** 5.4, System Test Case Analysis,26,***** 2.6, Traceability Analysis,13,** 2.5, SW/User Requirements Allocation Analysis,13,** 2.4, Concept Document Evaluation,13,** 4.3, Interface Analysis - Design,9,* 5.9, SW Integration Test Results Analysis,5, 5.7, Acceptance Test Case Analysis,5, 4.5, Software Integration Test Plan Analysis,5, 3.5, Acceptance Test Plan Analysis,5, 7.4, Retirement Assessment,3, 7.3, Migration Assessment,3, 7.2, Anomaly Evaluation,3, 7.1, Operating Procedure Evaluation,3, 6.3, Simulation Analysis,3, 5.12, Software FQT Procedure Analysis,3, 5.11, System Test Procedure Analysis,3, 6.2, Regression Test Analysis,0, 5.8, SW Integration Test Procedure Analysis,0, 5.6, SW Integration Test Case Analysis,0, 4.7, Component Test Plan Analysis,0, 3.6, Timing and Sizing Analysis,0, EOF cut -d, -f 1,2,3 freqall.dat > freq.dat gawk -F, '/#/ { next } function str(n,c, s) { while(n--) s = s c; return s } { sub(/^[ \t]*/,"",$1) sub(/[ \t]*$/,"",$1) } Pass==1 { Name[$1]=$2; F[$1]=$3; MaxF = $3 > MaxF ? $3 : MaxF } Pass==2 && $2 > 0 { C[$1] =$2 ; MaxC = $2 > MaxC ? $2 : MaxC } END { OFS=","; for(I in C) if(I in Name) { C1 = int(100*C[I]/MaxC) FC = int(C1*F[I]/100) if (FC > 0) print I ,Name[I], FC,str(int(FC),"*") }} ' Pass=1 freq.dat Pass=2 $Here/../data/costs.csv | sort -t, -r -n +2 > $Here/19.out gawk -F, 'BEGIN {OFS=","} function str(n,c, s) { while(n--) s = s c; return s } /^1/ {next} Pass==1 && $3 {Total += $3} Pass==2 && $3 {print $2,int(100*$3/Total), str(int(int(100*$3/Total)),"*")}' \ Pass=1 $Here/19.out Pass=2 $Here/19.out | malign