Skip to content
Snippets Groups Projects
Commit 56302905 authored by David Georg Reichelt's avatar David Georg Reichelt
Browse files

Extract label generation to common-function.sh

parent 97be299e
No related branches found
No related tags found
No related merge requests found
......@@ -106,15 +106,7 @@ RECEIVER[5]="${BASE_DIR}/collector-2.0/bin/collector -p 2345"
RECEIVER[5]="${BASE_DIR}/receiver/bin/receiver 2345"
# Create R labels
LABELS=""
for I in "${TITLE[@]}" ; do
title="$I"
if [ "$LABELS" == "" ] ; then
LABELS="\"$title\""
else
LABELS="${LABELS}, \"$title\""
fi
done
LABELS=$(createRLabels)
## Write configuration
uname -a >${RESULTS_DIR}/configuration.txt
......
......@@ -23,6 +23,20 @@ function getKiekerAgent() {
fi
}
function createRLabels() {
# Create R labels
LABELS=""
for I in "${TITLE[@]}" ; do
title="$I"
if [ "$LABELS" == "" ] ; then
LABELS="\"$title\""
else
LABELS="${LABELS}, \"$title\""
fi
done
echo $LABELS
}
# Initialize all unset parameters
if [ -z $SLEEP_TIME ]; then
SLEEP_TIME=30 ## 30
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment