From 5ab94129bf9c1e611258685b63152dee280b2032 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Sun, 6 Feb 2011 21:53:27 +0100 Subject: [PATCH] log logview lines only --- munin/log-single-line.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/munin/log-single-line.sh b/munin/log-single-line.sh index c32fa36..fe730f3 100755 --- a/munin/log-single-line.sh +++ b/munin/log-single-line.sh @@ -16,6 +16,9 @@ fi while read -r line do - timestamp=`date +%s` - echo $line|sed "s/\$1;1;;/\$1;1;$timestamp;/" > "$file" + beginning=`echo "$line"|cut -b 1-3` + if [ "$beginning" = '$1;' ]; then + timestamp=`date +%s` + echo $line|sed "s/\$1;1;;/\$1;1;$timestamp;/" > "$file" + fi done -- 2.30.2