fi
ssh -q $HOSTNAME <<EOF
- nohup stdbuf -oL while [ 1 ]; do
+ nohup stdbuf -o0 while [ 1 ]; do
df=`df --output=pcent "$DRIVE" | tail -1 | sed 's/[^0-9]//g'`
ts=`date '+%s'`
echo "$ts|$HOSTNAME|DISK-$LABEL-USED|$df" >> $OUTPATH
j=0
- echo $functions | tr ';' '\n' | sed 's/[(),]/ /g' | while read line; do
+ while read -U10 line; do
command=`echo $line | cut -d' ' -f1`
args="`echo $line | cut -d' ' -f2-`"
if [ -f /home/bdsm/bdsm.d/$command.$type ]; then
else
error "Could not find plugin for $command on $type:$host!"
fi
- done
+ done 10< <(echo $functions | tr ';' '\n' | sed 's/[(),]/ /g')
i=`expr $i + 1`
done