Skip to content

Commit

Permalink
Fixes per linter
Browse files Browse the repository at this point in the history
  • Loading branch information
reefland committed Jul 17, 2023
1 parent 65c61ca commit 9a8c93c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 36-diskstatus
Original file line number Diff line number Diff line change
Expand Up @@ -325,12 +325,12 @@ for i in "${!disksalias[@]}"; do #for every /dev/sdX device name
# print temp & smartd error
out+="${shortnames[$i]}_${diskserials[$i]} (${disksalias[$i]}):,${color}${temp}${unit}${undim},${status_color}${result}${error_status_code}${life}${undim},"
# insert \n every $COLUMNS column
if [ $(( ($i+1) % "$COLUMNS" )) -eq 0 ]; then
if [ $(( (i+1) % "$COLUMNS" )) -eq 0 ]; then
out+="\n"
fi
done
out+="\n"

printf "\ndisk status:\n"
# column: -t is table format, -s is column seperator, -d is do not display header
printf "$out" | column -t -s$',' -d --table-columns DEVICE,TEMP1,STATUS,DEVICE,TEMP2,STATUS --table-right TEMP1,TEMP2 | sed -e 's/^/ /'
printf '%b' "$out" | column -t -s$',' -d --table-columns DEVICE,TEMP1,STATUS,DEVICE,TEMP2,STATUS --table-right TEMP1,TEMP2 | sed -e 's/^/ /'

0 comments on commit 9a8c93c

Please sign in to comment.