Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

#!/bin/bash

LOGFILE=`find /application/log/*/ -name “*-20??-??-??” | grep -i ‘[a-zA-Z]-[0-9]’`

for i in $LOGFILE; do

LOGNAME=`basename $i`
KEY=`basename $i | sed ‘s/………..$//g’`
LOGFULLNAME=`echo “${i}” | sed ‘s/………..$//g’`

echo “UserParameter=app.${KEY},wc -l ${LOGFULLNAME}-`date +%Y-%m-%d` | awk ‘{print $1}'”

KEYTONAME=`echo “$KEY” | sed ‘s/_/ /g’`

HOSTID=’10080’
KEY=bidsys.${KEY}
NAME=$KEYTONAME
DELAY=120

echo “INSERT INTO items (‘hostid’, ‘name’, ‘key_’, ‘delay’) VALUES (‘$HOSTID’, ‘$NAME’, ‘$KEY’, ‘$DELAY’);”

done