Hi,
I am new to scripting.I am using redhat linux 6.I am just finding a way to summing up the output displayed as below.It will help me a lot since we used to get this kind of output every now and then.
I am pasting here the output .What is required is this o/p needs to be summed up and final value should be displayed.
for example:
# lsvdisk | grep -vi cap | awk '{print $8}'
1.57TB
1.57TB
2.00TB
70.00GB
90.00GB
70.00GB
70.00GB
output should be displayed like:few of them are TB and few of them are in GB.
might be a seperate output for TB and GB is also fine.
300 GB and 5 TB
.
Here i have pasted a sample.But in real time i used to get around 50 to 60 lines of output.
Appreciate your help on this.I am just finding a way from my end too.Advance thanks for your replies