Home > Back-end >  Shell how to read cycle of each row of the first to read text fields and output, and according to th
Shell how to read cycle of each row of the first to read text fields and output, and according to th

Time:03-30

Input instructions after showinfo output the content below, how to write a shell script run. Sh, I will give it parameter 61 (or 63 or 64), it reads the host rdma61. Ssdpool line below the first field, and one output log + field, until meet the next host rdma stop,

Such as: 61
run. Sh
Output:

Log18. TXT
Log21. TXT
Log24. TXT
Log28. TXT

Such as: 63
run. Sh
Log20. TXT
Log22. TXT
Log25. TXT
Log27. TXT


 
10.47839-5 root ssdpool
25 10.47839 rack rack. Ssdpool
3.49280 the host - 28 rdma61. Ssdpool
18 SSD 0.87320 osd. 18 up 1.00000 1.00000
21 SSD 0.87320 osd. 21 up 1.00000 1.00000
24 the SSD 0.87320 osd. 24 up 1.00000 1.00000
28 SSD 0.87320 osd. 28 up 1.00000 1.00000
3.49280 the host - 31 rdma63. Ssdpool
20 SSD 0.87320 osd. 20 up 1.00000 1.00000
22 the SSD 0.87320 osd. 22 up 1.00000 1.00000
25 SSD 0.87320 osd. 25 up 1.00000 1.00000
27 SSD 0.87320 osd. 27 up 1.00000 1.00000
3.49280 the host - 34 rdma64. Ssdpool
19 SSD osd. 0.87320 up to 1.00000 1.00000
23 SSD 0.87320 osd. 23 up to 1.00000 1.00000
26 SSD 0.87320 osd. 26 up 1.00000 1.00000
29 SSD 0.87320 osd. 29 down 0
1.00000
  • Related