summaryrefslogtreecommitdiff
path: root/showlog
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2006-10-27 12:34:26 +0000
committerJonas Smedegaard <dr@jones.dk>2006-10-27 12:34:26 +0000
commitcf1f8cc4307b7b183e8db88fe348434961b207af (patch)
treef9534ad258d6761c097557a552e01b06c8402a29 /showlog
parent4cc740bf04113f5d90272f05b10e49a8ba14004b (diff)
Fix bashism (avoid declaring functions as such). Extend copyright year.
Diffstat (limited to 'showlog')
-rwxr-xr-xshowlog14
1 files changed, 7 insertions, 7 deletions
diff --git a/showlog b/showlog
index b0b0f87..4ae3861 100755
--- a/showlog
+++ b/showlog
@@ -1,9 +1,9 @@
-#!/bin/bash
+#!/bin/sh
#
# /usr/local/sbin/showlog
-# Copyright 2002 Jonas Smedegaard <dr@jones.dk>
+# Copyright 2002-2006 Jonas Smedegaard <dr@jones.dk>
#
-# $Id: showlog,v 1.7 2006-10-27 12:27:15 jonas Exp $
+# $Id: showlog,v 1.8 2006-10-27 12:34:26 jonas Exp $
#
# Show topic-specific log entries
#
@@ -11,18 +11,18 @@
# halt on errors (NB! this is a bashism...)
set -e
-function usage() {
+usage() {
echo "Usage: $(basename $0) ftp|web|weberror|websuexec|mail|system [<keyword> [<keyword>...]]"
exit 1
}
-function exit1() {
+exit1() {
echo "Error: $1"
echo "Exiting..."
exit 1
}
-function cat_logs() {
+cat_logs() {
rootdir=$1
shift
patterns=$@
@@ -94,7 +94,7 @@ case "$target" in
;;
esac
-if [ $# \> 0 ]; then
+if [ $# -gt 0 ]; then
grep_opts=""
for keyword in $@; do
grep_opts="$opts -e $keyword"