Need help on awk to compare only integer on particular column

Hi,

[total]  0.23 2.94%  0.00 0.00% 17.8G 55.7% 19.6G 40.9%   630 0.00%
[system]  0.06 0.77%     -     - 7524M 22.9% 15.6G 32.6%    -     -

From the above sample output. I need to compare whether the 6th field is more than 10G..if so print the entire line. Here the 6th field is memory

TIA

Any attempts / ideas / thoughts from your side?

@Rudic..I tried teh following..

awk '$6~/G/{print $6}' | tr -d "G"

Next i thought of using xargs to send the output for comparison..but i didn't get that.

Hello Sumanthsv,

Please always do show us your efforts, as we all are here to learn and help each other.
Could you please try following and let me know if this helps you.

awk '{$6=$6~/[gG]/?$6:($6~/[mM]/?($6+0)/1024:($6~/[kK]/?($6+0)/(1024*1024):$6))} $6+0>10'  Input_file

Thanks,
R. Singh

Hi @RavinderSingh13.. It's working fine.Thanks a lot

@RavinderSingh13: seeing the long way you go to account for the units and their respective weight factors, I don't understand why you obviously don't count a value with absent units for "bytes" and a weight of 1E-9 (or 2^-30 for binary values)?