I've written a script to count the total size of SAN storage LUNs, and also display the LUN sizes.
From server to server, the LUNs sizes differ.
What I want to do is count the occurances as they occur and change.
These are the LUN sizes:
49.95
49.95
49.95
49.95
49.95
49.95
49.95
49.95
49.95
49.95
49.95
49.95
49.95
49.95
49.95
49.95
49.95
55.96
55.96
49.99
49.99
49.99
49.99
49.99
49.99
49.99
49.99
49.99
The above would produce something like this:
17x49.95, 2x55.96, 9x49.99
2nd example data file
27.96
27.96
27.96
27.96
27.96
27.96
27.96
13.95
2.95
2.95
142.99
142.99
142.99
142.99
142.99
142.99
142.99
produces
7x27.96, 1x13.95, 2x2.95, 7x142.99
I'm trying to find a way to do this with nawk.