diff options
author | Eugeni Dodonov <eugeni@mandriva.org> | 2009-09-09 00:03:00 +0000 |
---|---|---|
committer | Eugeni Dodonov <eugeni@mandriva.org> | 2009-09-09 00:03:00 +0000 |
commit | d8c7abe367ab0ed3b698ca6d71ff17f1d102f083 (patch) | |
tree | a7fa718385bcface27e971da0a6009fe5ed6b126 /cron-sh/functions.sh | |
parent | 92cac6c3193c86dda3be4b409592bfec9c7a40e0 (diff) | |
download | msec-d8c7abe367ab0ed3b698ca6d71ff17f1d102f083.tar msec-d8c7abe367ab0ed3b698ca6d71ff17f1d102f083.tar.gz msec-d8c7abe367ab0ed3b698ca6d71ff17f1d102f083.tar.bz2 msec-d8c7abe367ab0ed3b698ca6d71ff17f1d102f083.tar.xz msec-d8c7abe367ab0ed3b698ca6d71ff17f1d102f083.zip |
create check summary report
Diffstat (limited to 'cron-sh/functions.sh')
-rw-r--r-- | cron-sh/functions.sh | 9 |
1 files changed, 9 insertions, 0 deletions
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 |