Update nodemgmt-scripts.sh

This commit is contained in:
2019-12-12 23:40:13 -06:00
parent 920f542ef1
commit a925e9c2ef

View File

@@ -380,12 +380,13 @@ STATUS(){
fi fi
declare -A partitions declare -A partitions
partitions=`${NCMD} df -hBM | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $5 " " $1 }' | while read output; do echo $output | awk '{ print $2 }'; done;` partitions=`${NCMD} df -hBM | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $5 " " $1 }' | while read output; do echo $output | awk '{ print $2 }'; done;`
partitions=`echo ${partitions[*]}` partitions=(`echo ${partitions[*]}`)
echo $partitions;
for partition in "${partitions[@]}"; do for partition in "${partitions[@]}"; do
freespace=`${NCMD} df -hPBM ${partition} | awk '{print $5}' |tail -1|sed 's/%$//g'` if [ "${partition}" != "udev" ]; then
echo -en " ${partition}$spc: " freespace=`${NCMD} df -hPBM ${partition} | awk '{print $5}' |tail -1|sed 's/%$//g'`
echo -e "${idsCL[Green]}${freespace}${idsCL[Default]}" echo -en " ${partition}$spc: "
echo -e "${idsCL[Green]}${freespace}${idsCL[Default]}"
fi
done done