Hi all, I am trying to achieve the following output but i am not able to do. If someone can please guide me to do it.
INPUT:
count name Description
1 abcd - CPU Load is 70.8
1 dcd - Memory Utilization is 96.57%
2 gghh - CPU Utilization is 97.61%
1 gghh - CPU Utilization is 97.67%OUTPUT
count name Description
1 abcd - CPU Load is 70.8
1 dcd - Memory Utilization is 96.57%
3 gghh - CPU Utilization is 97.67%The script has to find the lines matching with same text except numeric values by comparing that values it has to keep line which is having biggest value and remove the rest and the count on the count column.
Please guide me
If the input data is sorted, then I would design a break point report script. This link might get you started:
Thank u very much for ur reply nails !!! in what way u need to sort... i hope its already sorted ... ...
for eg:
1 abcd - cpu load is 80%
1 abcd - cpu utilization is 90% these two are different.. i dont want to merge it.but in another case
input
1 abcd - cpu load is 80%
1 abcd - cpu load is 90%
i want to merge it and highest value should be there and also count need to be increased.output:
2 abcd - cpu load is 90%another case :
2 abcd - cpu load is 80%
1 abcd - cpu load is 90%
1 abcd - cpu utilization is 90%
output:3 abcd - cpu load is 90%
1 abcd - cpu utilization is 90% .... i need to differentiate with that metrics and host names .... i hope u understand this .... Is it possible ?
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |