From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 22 14:19:57 2009 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CBDD10656BA; Thu, 22 Jan 2009 14:19:57 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (unknown [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id 90B328FC44; Thu, 22 Jan 2009 14:19:56 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.3/8.14.3) with ESMTP id n0MEJrr9092480; Thu, 22 Jan 2009 15:19:53 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.3/8.14.3/Submit) id n0MEJrsK092478; Thu, 22 Jan 2009 15:19:53 +0100 (CET) (envelope-from olli) From: Oliver Fromme Message-Id: <200901221419.n0MEJrsK092478@lurza.secnetix.de> To: christoph.mallon@gmx.de (Christoph Mallon) Date: Thu, 22 Jan 2009 15:19:53 +0100 (CET) In-Reply-To: <497867A9.7000801@gmx.de> X-Mailer: ELM [version 2.5 PL8] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Thu, 22 Jan 2009 15:19:54 +0100 (CET) Cc: freebsd-hackers@FreeBSD.ORG, xistence@0x58.com, cperciva@FreeBSD.ORG Subject: Re: freebsd-update's install_verify routine excessive stating X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2009 14:19:57 -0000 Christoph Mallon wrote: > Oliver Fromme schrieb: > > > cut -f 2,7 -d '|' | > > > grep -E '^f' | > > > cut -f 2 -d '|' | > > > sort -u > filelist > > > > It's unclear why there are two "cut" commands. The 7th > > field isn't used at all. Also, the -E option to grep > > After the first cut the seventh field becomes the second: Ah yes, you're right, of course. My caffeine level was insufficient, I guess. :-) > > So I would suggest to replace the whole pipe with this: > > > > awk -F "|" '$2 ~ /^f/ {print $2}' "$@" | > > sort -u > filelist > > It should print $7, see above. Right. Thanks for pointing it out. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "Whatever happened to the days when hacking started at the cerebral cortex, and not at the keyboard?" -- Sid on userfriendly.org by Illiad, 2007-06-20