Sort on the correct column

This commit is contained in:
Eirik Øverby 2025-02-02 18:16:47 +01:00
parent 052c645147
commit 8ddd3a099a

View file

@ -90,7 +90,7 @@ showstats() {
for f in "${_dest}"/"${_mode}"__*.log ; do for f in "${_dest}"/"${_mode}"__*.log ; do
echo -n "$f " | sed -e 's/\.log//' -e 's/\// /' echo -n "$f " | sed -e 's/\.log//' -e 's/\// /'
cut -f 2 -w < "$f" | awk '{s+=$0}END{print s/NR}' RS=" " cut -f 2 -w < "$f" | awk '{s+=$0}END{print s/NR}' RS=" "
done | sort -gk 2 | $headcmd | tr '_' ' ' done | sort -gk 3 | $headcmd | tr '_' ' '
) | column -t ) | column -t
else else
echo "${_dest} directory not found!" echo "${_dest} directory not found!"