Re: {bb} BB and logs
Robert-Andre Croteau <[email protected]> Tue, 26 Feb 2008 14:32:49 -0500
| Newsgroups | gmane.network.bb4.general |
|---|---|
| Message-ID | <[email protected]> |
on some OS, there's a context switch for the grep command:
cat <somefile> | grep -1 sometext
where it will print the previous, current and following line (-1),
using -2, it will display, the 2 previous lines, the current and 2
following lines.
but looking at bb-msgs.sh, I'm not sure that would work as it first
checks for matching lines and then removes those that are to be ignored...
if you don't use ignore string, it may work but haven't tried myself.
the place to change might be this code(around line 290):
if [ -s $BBTMP/MSG.tail.$PID ]
then
$TAIL -c +${LINES} $file 2>$BBTMP/MSG.tail.$PID | $GREP "$word" >>
$MBAD
fi
change
$GREP "$word"
to
$GREP -1 "$word"
that *might* give you 3 lines... (previous,current,following)
bye
--
Robert-Andre Croteau BSD,MOTU
Quest Software, Inc. Big Brother, Product Architect
http://www.quest.com/ http://bb4.com/
+1 (514) 238-9374
Si le bonheur ne s'achete pas alors louez le.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
To unsubscribe from this list, or to subscribe to the bb-digest list
send e-mail to mailto:[email protected] with unsubscribe bb -and/or-
subscribe bb-digest in the BODY of the message.