From 95cb34527650d45490603819841d45497ebdcb97 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sun, 27 Jun 2021 21:16:08 +0200 Subject: print-status-html: fix indentation --- print-status-html | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/print-status-html b/print-status-html index 4babe08..6a8f12c 100755 --- a/print-status-html +++ b/print-status-html @@ -69,28 +69,28 @@ EOF T p ' /proc/mdstat \ - | sort -u \ - | while read -r line; do - if [ -z "${line%%* finish=*min*}" ]; then - duration="${line##* finish=}" - duration="${duration%%min*}" - time=$( - date +'%F %T' -d@$(( - $(date +%s) + $(echo "60 * ${duration}" | bc -l | sed 's/\..*$//') - )) - ) - printf '%s (%s)\n' "${line}" "${time}" - else - printf '%s\n' "${line}" - fi - done \ - | sed ' - s,.*\[U\+\]$,\0, - t - s,^\(re\(shape\|covery\|sync\) \S\+\) \[\(\S*\)>\(\.*\)\] \(\S\+\s\+\S\+\s\+\S\+\)$,\1 [\3\>\4] \5, - t - s,.*,\0, - ' + | sort -u \ + | while read -r line; do + if [ -z "${line%%* finish=*min*}" ]; then + duration="${line##* finish=}" + duration="${duration%%min*}" + time=$( + date +'%F %T' -d@$(( + $(date +%s) + $(echo "60 * ${duration}" | bc -l | sed 's/\..*$//') + )) + ) + printf '%s (%s)\n' "${line}" "${time}" + else + printf '%s\n' "${line}" + fi + done \ + | sed ' + s,.*\[U\+\]$,\0, + t + s,^\(re\(shape\|covery\|sync\) \S\+\) \[\(\S*\)>\(\.*\)\] \(\S\+\s\+\S\+\s\+\S\+\)$,\1 [\3\>\4] \5, + t + s,.*,\0, + ' find /sys/block/ -mindepth 1 -maxdepth 1 -name 'md*' -printf '%f\n' \ | sed 's@^md@@' \ -- cgit v1.2.3