From d8c7abe367ab0ed3b698ca6d71ff17f1d102f083 Mon Sep 17 00:00:00 2001 From: Eugeni Dodonov Date: Wed, 9 Sep 2009 00:03:00 +0000 Subject: create check summary report --- cron-sh/functions.sh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'cron-sh/functions.sh') diff --git a/cron-sh/functions.sh b/cron-sh/functions.sh index 40fbcab..9200838 100644 --- a/cron-sh/functions.sh +++ b/cron-sh/functions.sh @@ -58,6 +58,15 @@ Diffcheck() { fi } +Count() { + # counts number of entries in a file + LOG="$1" + FILE="$2" + MESSAGE="$3" + NUM_ENTRIES=$(wc -l 2>/dev/null < $FILE) + echo "$MESSAGE: $NUM_ENTRIES" >> $LOG +} + Syslog() { if [[ ${SYSLOG_WARN} == yes ]]; then cat ${1} | while read line; do -- cgit v1.2.1