Correct variable incrementation ((LINE++)) only work with BASH. For SH:
LINE=$((LINE+1))
This commit is contained in:
parent
7a3403f5ef
commit
f4c62f2784
|
@ -45,7 +45,8 @@ if [ $(which zpool) ]; then
|
|||
PART_NAME=$(df -T | grep zfs | sed -n "${LINE},${LINE}p" | awk '{print $1}')
|
||||
DISK_USAGE=$(df -T | grep zfs | sed -n "${LINE},${LINE}p" | awk '{print $6}')
|
||||
printf '%b' "\n${MAGENTA}+ ${WHITEB}${PART_NAME}${RESET} [ ${DISK_USAGE} ] "
|
||||
(( LINE++ ))
|
||||
LINE=$((LINE+1))
|
||||
# Bash ONLY: (( LINE++ ))
|
||||
done
|
||||
fi
|
||||
### FI ZFS
|
||||
|
|
Loading…
Reference in New Issue