I have a script https://www.linux.org/threads/linux-org-user-created-helpful-shell-scripts.41234/post-249595
It outputs multiple lines, each line has some space-separated values. How to sort the output by 6th value? Treat it as a real number.
sorts in some random order.
For the output format see line 100 of the script
UPD
Solution
It outputs multiple lines, each line has some space-separated values. How to sort the output by 6th value? Treat it as a real number.
Bash:
./kt.sh info | sort -n -k 6
For the output format see line 100 of the script
Bash:
...
printf "%3.0lf%% of %11d %4.0lf kb/s %s %8s %4s %s \n" $((100*$prog/$dsize)) $dsize $(($speed/1000)) $(echo "scale=5 ; $ratio / ($seed_time / 24)" | bc -l | awk '{printf "%.5f\n", $0}') $sl $pri "$name"
...
UPD
Solution
Last edited: