hi all,
i'm very new to scripting and have the folllowing issue. I have used a few commands to get a list of numbers, but I need to strip away the non-numeric ones, and then need a total of all values. any ideas?
root@unixserver # cat myfile | awk '{print $8}'| sort -rn
1504
1344
896
704
608
448
416
416
000:05:14
000:05:14
The output changes day by day, so trimming the last 2 entries is not really suitable. What I need is the ability to take out whole entries that are not numbers - then the sum of remaining entries.
Many thanks.