Correct variable incrementation ((LINE++)) only work with BASH. For SH:

LINE=$((LINE+1))
This commit is contained in:
Jeremy Gardais 2015-03-26 10:00:58 +01:00
parent 7a3403f5ef
commit f4c62f2784
1 changed files with 2 additions and 1 deletions

View File

@ -45,7 +45,8 @@ if [ $(which zpool) ]; then
PART_NAME=$(df -T | grep zfs | sed -n "${LINE},${LINE}p" | awk '{print $1}') 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}') DISK_USAGE=$(df -T | grep zfs | sed -n "${LINE},${LINE}p" | awk '{print $6}')
printf '%b' "\n${MAGENTA}+ ${WHITEB}${PART_NAME}${RESET} [ ${DISK_USAGE} ] " printf '%b' "\n${MAGENTA}+ ${WHITEB}${PART_NAME}${RESET} [ ${DISK_USAGE} ] "
(( LINE++ )) LINE=$((LINE+1))
# Bash ONLY: (( LINE++ ))
done done
fi fi
### FI ZFS ### FI ZFS