PageRenderTime 52ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/code/awk-scripts/pdr.awk

https://gitlab.com/Raizan/buku-ta
AWK | 16 lines | 13 code | 3 blank | 0 comment | 0 complexity | af3d167ada6be7932b612d13f53fbeed MD5 | raw file
  1. BEGIN {
  2. sendLine = 0;
  3. recvLine = 0;
  4. }
  5. $0 ~/^s.* AGT/ {
  6. sendLine ++ ;
  7. }
  8. $0 ~/^r.* AGT/ {
  9. recvLine ++ ;
  10. }
  11. END {
  12. printf "Sent: %d Recv: %d Ratio: %.4f\n", sendLine, recvLine, (recvLine/sendLine);
  13. }