summaryrefslogtreecommitdiff
path: root/showlog
diff options
context:
space:
mode:
Diffstat (limited to 'showlog')
-rwxr-xr-xshowlog8
1 files changed, 4 insertions, 4 deletions
diff --git a/showlog b/showlog
index aeceb94..7d78e3d 100755
--- a/showlog
+++ b/showlog
@@ -3,7 +3,7 @@
# /usr/local/sbin/showlog
# Copyright 2002-2006 Jonas Smedegaard <dr@jones.dk>
#
-# $Id: showlog,v 1.10 2006-10-27 22:02:22 jonas Exp $
+# $Id: showlog,v 1.11 2007-09-27 21:46:27 jonas Exp $
#
# Show topic-specific log entries
#
@@ -43,7 +43,7 @@ cat_logs() {
done
}
-tail_history="50"
+tail_history="$(tail_history:-500)"
target=$1
shift || exit1 "Missing argument"
@@ -100,9 +100,9 @@ if [ $# -gt 0 ]; then
for keyword in $@; do
grep_opts="$opts -e $keyword"
done
- cat_logs "$logroot" "$logpattern" | grep -i $grep_opts | tail -n $tail_history
+ cat_logs "$logroot" "$logpattern" 7 | 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" | tail -n $tail_history
+ cat_logs "$logroot" "$logpattern" 7 | tail -n $tail_history
# [ -f $logroot/$log ] && tail -n 0 -F $logroot/$log
fi