PageRenderTime 56ms CodeModel.GetById 28ms RepoModel.GetById 0ms app.codeStats 0ms

/pdr.awk

https://bitbucket.org/naheel_azawy/ns2-manet-cmp
AWK | 21 lines | 17 code | 4 blank | 0 comment | 0 complexity | 598ee0f87c3b0e3c848e1e83a9e56b00 MD5 | raw file
Possible License(s): GPL-3.0
  1. BEGIN {
  2. sendLine = 0;
  3. recvLine = 0;
  4. fowardLine = 0;
  5. }
  6. $0 ~/^s.* AGT/ {
  7. sendLine ++ ;
  8. }
  9. $0 ~/^r.* AGT/ {
  10. recvLine ++ ;
  11. }
  12. $0 ~/^f.* RTR/ {
  13. fowardLine ++ ;
  14. }
  15. END {
  16. printf "%.4f", (recvLine/sendLine);
  17. }