Commit bbe20b3b authored by 's avatar

Corrected bug in parsing abw_info output


git-svn-id: file:///home/svn/mapi/trunk@1356 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent 43cbd1d3
......@@ -28,7 +28,7 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# $Id: rrd_graph_all.sh,v 1.2 2006/12/01 15:34:27 ubik Exp $
# $Id:$
#
export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
......@@ -220,6 +220,7 @@ for (( I=0 ; $I<$LABEL_NO ; I++ )) ; do
if [ -n "${MEASUREMENT_ARRAY_IN[0]}" ]; then
if [ ${MEASUREMENT_ARRAY_IN[0]} == "scope:" ]; then
LABEL_IN[$I]=${MEASUREMENT_ARRAY_IN[1]}
PREFIX_IN[$I]=${MEASUREMENT_ARRAY_IN[2]}
DESCRIPTION_IN[$I]=${MEASUREMENT_ARRAY_IN[3]}
......@@ -227,7 +228,7 @@ for (( I=0 ; $I<$LABEL_NO ; I++ )) ; do
J=4
END=0
while [ $J -lt ${#MEASUREMENT_ARRAY_IN[*]} -a $END -eq 0 ]; do
DESCRIPTION_IN[$I]="$DESCRIPTION_IN[$I] ${MEASUREMENT_ARRAY_IN[$J]}"
DESCRIPTION_IN[$I]="${DESCRIPTION_IN[$I]} ${MEASUREMENT_ARRAY_IN[$J]}"
if [ "${MEASUREMENT_ARRAY_IN[$J]: -1}" = "\"" ]; then
END=1
fi
......@@ -236,9 +237,9 @@ for (( I=0 ; $I<$LABEL_NO ; I++ )) ; do
fi
DESCRIPTION_IN[$I]=${DESCRIPTION_IN[$I]:1:${#DESCRIPTION_IN[$I]}-2}
echo "LABEL_IN[$I]: $LABEL_IN[$I]"
echo "PREFIX_IN[$I]: $PREFIX_IN[$I]"
echo "DESCRIPTION_IN[$I]: $DESCRIPTION_IN[$I]"
echo "LABEL_IN[$I]: ${LABEL_IN[$I]}"
echo "PREFIX_IN[$I]: ${PREFIX_IN[$I]}"
echo "DESCRIPTION_IN[$I]: ${DESCRIPTION_IN[$I]}"
fi
fi
......@@ -252,14 +253,15 @@ for (( I=0 ; $I<$LABEL_NO ; I++ )) ; do
if [ -n "${MEASUREMENT_ARRAY_OUT[0]}" ]; then
if [ ${MEASUREMENT_ARRAY_OUT[0]} == "scope:" ]; then
PREFIX_OUT[$I]=${MEASUREMENT_ARRAY_IN[2]}
LABEL_OUT[$I]=${MEASUREMENT_ARRAY_OUT[1]}
PREFIX_OUT[$I]=${MEASUREMENT_ARRAY_OUT[2]}
DESCRIPTION_OUT[$I]=${MEASUREMENT_ARRAY_IN[3]}
DESCRIPTION_OUT[$I]=${MEASUREMENT_ARRAY_OUT[3]}
if [ "${DESCRIPTION_OUT[$I]: -1}" != "\"" ]; then
J=4
END=0
while [ $J -lt ${#MEASUREMENT_ARRAY_OUT[*]} -a $END -eq 0 ]; do
DESCRIPTION_OUT[$I]="$DESCRIPTION_OUT[$I] ${MEASUREMENT_ARRAY_OUT[$J]}"
DESCRIPTION_OUT[$I]="${DESCRIPTION_OUT[$I]} ${MEASUREMENT_ARRAY_OUT[$J]}"
if [ "${MEASUREMENT_ARRAY_OUT[$J]: -1}" = "\"" ]; then
END=1
fi
......@@ -268,9 +270,9 @@ for (( I=0 ; $I<$LABEL_NO ; I++ )) ; do
fi
DESCRIPTION_OUT[$I]=${DESCRIPTION_OUT[$I]:1:${#DESCRIPTION_OUT[$I]}-2}
echo "LABEL_OUT[$I]: $LABEL_OUT[$I]"
echo "PREFIX_OUT[$I]: $PREFIX_OUT[$I]"
echo "DESCRIPTION_OUT[$I]: $DESCRIPTION_OUT[$I]"
echo "LABEL_OUT[$I]: ${LABEL_OUT[$I]}"
echo "PREFIX_OUT[$I]: ${PREFIX_OUT[$I]}"
echo "DESCRIPTION_OUT[$I]: ${DESCRIPTION_OUT[$I]}"
fi
fi
done
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment