fork download
  1. set text {tools show stats
  2. Resource Manager info at 023 h 06/01/20 09:14:16.105:
  3.  
  4. Hardware Resource Usage #1, abc iom-32-100g, Pipe #0:
  5. | Total | Allocated | Free
  6. -------------------------------+-----------+-----------+------------
  7. stat vale abc/ghj(0) | 256| 0| 256
  8. stat vale abc/ghj(1) | 256| 0| 256
  9.  
  10. new Statistic | Count
  11. ---------------------------------+-------------
  12. first | 0
  13. seconds| 0
  14.  
  15. third info | Count
  16. fourth| 0
  17. fifth | 125
  18.  
  19. Forwarding Table Statistics | Used / Free / Max / Reject
  20. ---------------------------------+-----------------------------------
  21. third stat Entries | 2 / 36856 / 36864
  22. Important | 1 / 13133 / 13136 / 0
  23. fifth entry < 56 | 1 / 5743 / 5744 / 0
  24. sixth entry > 5 | 0 / 112 / 112 / 0
  25.  
  26. Service manager resources
  27. -------------------------
  28. Total count: 2/ 3072
  29. Total info: 2/ 401
  30.  
  31. ABC Group Statistics | Used / Free / Max
  32. ---------------------------------+-----------------------
  33. Entries | 0 / 256 / 256
  34. }
  35. regexp -nocase -line -- {^[[:space:]]*(Important.*)} $text - match1
  36. regexp -nocase -line -- {^[[:space:]]*(fifth entry < 56.*)} $text - match2
  37. puts "$match1\n$match2"
Success #stdin #stdout 0s 5312KB
stdin
Standard input is empty
stdout
Important  |      1 /  13133 /  13136 / 0
fifth entry < 56 |      1 /   5743 /   5744 / 0