Added columns at 30-hdd-temp

This commit is contained in:
2019-08-19 15:22:47 +03:00
parent d07354218e
commit ac4f47cf0b
8 changed files with 6 additions and 2 deletions

4
30-hdd-temp Normal file → Executable file
View File

@@ -1,6 +1,7 @@
#!/bin/bash
sd=(sda sdb sdc sdd sde sdf)
out=""
COLUMNS=3
clear="\e[0m\e[39m"
my_target_temp=45
@@ -12,6 +13,9 @@ for i in ${!sd[@]}; do
fi
out+="${sd[$i]} \e[30m $color $temp $clear ,"
c=i+1
if [ $((($i+1) % $COLUMNS)) -eq 0 ]; then
out+="\n"
fi
done
out+="\n"
echo -e "