genplotdelrate.awk

来自「this is source code for adhoc network us」· AWK 代码 · 共 38 行

AWK
38
字号
/*compute the delivery rate h <speed, sent, delivered> point*/NR == 2		{			speed = $1;			sent  = $2;			del = $3;		}NR > 2		{			if( speed != $1)  			{												tmp = 0;								printf"%d \t %.2f\n", speed, del / sent * 100;							/* reinitialize the variables  */				speed = $1;				sent = $2;				del = $3;			}			else			{				sent += $2;				del += $3			}		}END		{			/* print the last row that otherwise wouldn't be printed */							printf"%d \t %.2f\n", speed, del / sent * 100;		}		

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?