summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2021-06-27 21:18:23 +0200
committerErich Eckner <git@eckner.net>2021-06-27 21:18:23 +0200
commit7f0c928bca7d16d2b6a5e052d6f66422c64c0177 (patch)
tree01d8bf75173bccf38ac1135c314d976ea7ae6403
parent95cb34527650d45490603819841d45497ebdcb97 (diff)
downloadprint-status-7f0c928bca7d16d2b6a5e052d6f66422c64c0177.tar.xz
print-status-html: sort by number
-rwxr-xr-xprint-status-html8
1 files changed, 7 insertions, 1 deletions
diff --git a/print-status-html b/print-status-html
index 6a8f12c..a1bc5eb 100755
--- a/print-status-html
+++ b/print-status-html
@@ -69,7 +69,13 @@ EOF
T
p
' /proc/mdstat \
- | sort -u \
+ | sed '
+ s/^md\([0-9]\+\):/\1 \0/
+ ' \
+ | sort -k1n,1 \
+ | sed '
+ s/^\S\+ //
+ ' \
| while read -r line; do
if [ -z "${line%%* finish=*min*}" ]; then
duration="${line##* finish=}"