jhalfs X 2407 - paco patch try5

Dan Nicholson dbn.lists at gmail.com
Tue Mar 28 08:00:49 PST 2006


On 3/28/06, Chris Schwemmer >
> Let's see... grep ^- * in var/paco/log produces 1007 lines. I'll just copy
> some examples:
<snip>
> coreutils-5.94:-/usr/bin/chgrp|-2|-2|-2

That's clever, I never thought about that.  I see two ways to do this.

One, check if files exist in paco.tmp before generating the log:

for FILE in $(</tmp/paco.tmp); do
    [ -e $FILE ] || sed -i "/^$FILE\$/d" /tmp/paco.tmp
done

The ^ and \$ mark the beginning and end of the line.  I don't remember
if there are any other characters in the temp file, but I think it's
just file names.

Or, after the log is created, assuming you know, e.g., the name of the
log NAME=coreutils-5.94:

sed -i '/^-/d' /var/log/paco/$NAME

--
Dan



More information about the alfs-discuss mailing list