diff options
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 |