Please UNSUBCRIBE ME
On Mon, Aug 19, 2013 at 6:11 PM, GodAtum <hq-users@hyperic.org> wrote:
I have edited the script so it only reads the last line in the csv:
#!/bin/bash
INPUT=finalTimes.csv
OLDIFS=$IFS
&& { echo "$INPUT file not found"; exit 99; }
lastline=`cat $INPUT | tail -1`
timestamp=`echo $lastline |cut -d, -f1`
rs1=`echo $lastline |cut -d, -f2`
rs2=`echo $lastline |cut -d, -f3`
rs3=`echo $lastline |cut -d, -f4`
rs4=`echo $lastline |cut -d, -f4`
echo "timestamp=$timestamp"
echo "ResponseTime1=$rs1"
echo "ResponseTime2=$rs2"
echo "ResponseTime3=$rs3"
echo "ResponseTime4=$rs4"
IFS=$OLDIFS
however it does not give back any results in Hyperic.
>