From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31809 invoked by uid 1002); 19 Aug 2003 13:04:51 -0000 Mailing-List: contact gentoo-dev-help@gentoo.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Received: (qmail 27223 invoked from network); 19 Aug 2003 13:04:51 -0000 Date: Tue, 19 Aug 2003 15:05:51 +0200 From: Thomas de Grenier de Latour To: gentoo-dev@gentoo.org Message-Id: <20030819150551.3a22855a.degrenier@easyconnect.fr> In-Reply-To: <20030819053722.GA28151@force.stwing.upenn.edu> References: <20030819053722.GA28151@force.stwing.upenn.edu> Organization: Fasmz X-Mailer: Sylpheed version 0.9.4claws (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [gentoo-dev] patch: emergemail feature in functions.sh X-Archives-Salt: 9b4dead1-55f1-4c1f-a6a3-e709ce124410 X-Archives-Hash: a010d16b1a44c23a63a9d9e84a47108a On Tue, 19 Aug 2003 01:37:23 -0400 Owen Gunden wrote: > This is useful if you upgrade or install multiple packages at once, > and you don't want to miss any important messages that go whizzing by. Just in case it can be useful to someone, I've written a small script to retrieve einfos in emerge log files (the ones in PORT_LOGDIR): >>> "portlog-info" >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> #!/bin/bash # Usage: "portlog-info [pkg-name]" PORT_LOGDIR="`sed -n s:^PORT_LOGDIR=::p /etc/make.conf`" if [ -d "${PORT_LOGDIR}" ] then cd ${PORT_LOGDIR} else echo "PORT_LOGDIR not found." exit 1 fi for logfile in $( ls *$1* 2> /dev/null ) do if [ 0 -ne "`cat -v ${logfile} | grep -c "^\ \^\[\[..;01m\*"`" ] then echo -n "########## " echo -n ${logfile} | sed -e s:"^[0-9]*-":: -e s:".log$":: echo " ##########" sed -n -e " /^\ \o033\[..;01m\*/{ i p n :block /^\ \o033\[..;01m\*/{ p n b block } }" ${logfile} echo fi done <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Note that: - I've assumed that the logs have colors (NOCOLOR=false) - I'm not a sed guru and have written this with a sed manual in the hands but I would be interrested by a shorter syntax for the "retrieve blocks of consecutive matching lines and separate them by a blank line" -- TGL. -- gentoo-dev@gentoo.org mailing list