diff options
author | root <root@jones.dk> | 2010-05-04 12:03:18 +0200 |
---|---|---|
committer | root <root@jones.dk> | 2010-05-04 12:03:18 +0200 |
commit | 154d5bd7eb031369256a24a29684e87df98a2e24 (patch) | |
tree | 6743333e8f1a8d810897c392d4b078413602fb0e /showlog | |
parent | fa70afb13d046c9709585d17e9caa742c7181cb7 (diff) |
Improve showlog: make logfilecount overridable.
Diffstat (limited to 'showlog')
-rwxr-xr-x | showlog | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -10,6 +10,8 @@ set -e +logfilecount="${logfilecount:-1}" + usage() { echo "Usage: $(basename $0) ftp|web|weberror|websuexec|mail|sms|smsbox|bearerbox|system [<keyword> [<keyword>...]]" exit 1 @@ -109,9 +111,9 @@ if [ $# -gt 0 ]; then for keyword in $@; do grep_opts="$opts -e $keyword" done - cat_logs "$logroot" "$logpattern" 7 | grep -i $grep_opts | tail -n $tail_history + cat_logs "$logroot" "$logpattern" "$logfilecount" | grep -i $grep_opts | tail -n $tail_history # [ -f $logroot/$log ] && tail -n 0 -F $logroot/$log | grep -i $grep_opts else - cat_logs "$logroot" "$logpattern" 7 | tail -n $tail_history + cat_logs "$logroot" "$logpattern" "$logfilecount" | tail -n $tail_history # [ -f $logroot/$log ] && tail -n 0 -F $logroot/$log fi |