From owner-freebsd-questions Wed Mar 13 19: 6:29 2002 Delivered-To: freebsd-questions@freebsd.org Received: from lists.blarg.net (lists.blarg.net [206.124.128.17]) by hub.freebsd.org (Postfix) with ESMTP id 34C0037B416; Wed, 13 Mar 2002 19:06:21 -0800 (PST) Received: from thig.blarg.net (thig.blarg.net [206.124.128.18]) by lists.blarg.net (Postfix) with ESMTP id C4E42BDA8; Wed, 13 Mar 2002 19:06:20 -0800 (PST) Received: from localhost.localdomain ([206.124.139.115]) by thig.blarg.net (8.9.3/8.9.3) with ESMTP id TAA19223; Wed, 13 Mar 2002 19:06:20 -0800 Received: (from jojo@localhost) by localhost.localdomain (8.11.6/8.11.3) id g2E39Hw18550; Wed, 13 Mar 2002 19:09:17 -0800 (PST) (envelope-from swear@blarg.net) To: Pete Fritchman Cc: "Gary W. Swearingen" , Mike Meyer , "J.S." , freebsd-questions@FreeBSD.ORG, ports@FreeBSD.ORG Subject: Re: Ports collection falling behind References: <20020312214509.3616bdd5.johann@broadpark.no> <15502.28105.634074.758224@guru.mired.org> <20020313191731.C74180@databits.net> From: swear@blarg.net (Gary W. Swearingen) Date: 13 Mar 2002 19:09:17 -0800 In-Reply-To: <20020313191731.C74180@databits.net> Message-ID: <27pu27976q.u27@localhost.localdomain> Lines: 19 User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Pete Fritchman writes: > [ long script snipped ] > > ... or you could make this a lot simpler on yourself: > > #!/bin/sh > awk -F\| '/^$1-/ { print $6 }' /usr/ports/INDEX Nice! Except that's the wrong "$1" and it handles "xemacs" poorly too (and doesn't handle non-installed packages, an unlikely need). This lets the user do some of the work (and I might remove "/^" and "-"): awk -F\| '/^'${1}'-/ { printf "%-40s %s\n", $1, $6 }' /usr/ports/INDEX | tr ' ' '.' Maybe the lesson here is to not post scripts. Does it start too many long threads? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message