From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 22 12:33:49 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 4CE28106567F for ; Thu, 22 Jan 2009 12:33:49 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id 8CC8D8FC22 for ; Thu, 22 Jan 2009 12:33:48 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: (qmail invoked by alias); 22 Jan 2009 12:33:47 -0000 Received: from p54A3E2E9.dip.t-dialin.net (EHLO tron.homeunix.org) [84.163.226.233] by mail.gmx.net (mp056) with SMTP; 22 Jan 2009 13:33:47 +0100 X-Authenticated: #1673122 X-Provags-ID: V01U2FsdGVkX1/GR8MRxgfGI0VyjL2y5ZmgX5RSdoweq7UN1vZzQh /JQ3LovZP6lb4p Message-ID: <497867A9.7000801@gmx.de> Date: Thu, 22 Jan 2009 13:33:45 +0100 From: Christoph Mallon User-Agent: Thunderbird 2.0.0.19 (X11/20090103) MIME-Version: 1.0 To: Oliver Fromme References: <200901221217.n0MCHfY3086653@lurza.secnetix.de> In-Reply-To: <200901221217.n0MCHfY3086653@lurza.secnetix.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.66 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 12:33:49 -0000 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: echo 'a|b|c|d|e|f|g' | cut -f 2,7 -d '|' So the second cut selects the original seventh field and fills it into the file "filelist". > > 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. Christoph