Using shell scripting, how can I convert from one memory format to another and find the difference between them?
I want to compare
current rate and
previous memory rate (Where we need to compare decimal value with integer).
If it is positive it should display growth, If its negative it should display no growth, If it is 0 it should display constant.
Name current previous rate rate Raju 6.7M 6.9M sita 52K 52K ravi 76K 76K seetha 52K 52K geetha 153M 56K ritta 13M 7.8G
This is just a sample output--I want output like this!
Name current previous difference comment rate rate Raju 6.7M 6.9M -0.2 No growth sita 52K 52K 0 constant ravi 76K 76K 0 constant seetha 52K 52K 0 constant geetha 153M 56K 97 growth ritta 13M 7.8G 5.2 growth