From owner-freebsd-questions@FreeBSD.ORG Wed Sep 20 18:45:37 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 76A3C16A412 for ; Wed, 20 Sep 2006 18:45:37 +0000 (UTC) (envelope-from andrewgould@yahoo.com) Received: from web35303.mail.mud.yahoo.com (web35303.mail.mud.yahoo.com [66.163.179.97]) by mx1.FreeBSD.org (Postfix) with SMTP id EA79343D6A for ; Wed, 20 Sep 2006 18:45:33 +0000 (GMT) (envelope-from andrewgould@yahoo.com) Received: (qmail 98956 invoked by uid 60001); 20 Sep 2006 18:45:33 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=S05LduU0RdI9VlIvJI2qMzOf1A6uRWBJL3P/taFaOyG7gOBuo26wt7NHTFxAYiUJGuoSoldXLMmvCdS6PzoNwobTFI5/qNu9QpSZ5lChsX31SwQ3fznNhX8jYxmt5daq7Ct+Qpi9ZVH3/LWfKkSZOWQI4q7zO7gLonsZZaz7jgY= ; Message-ID: <20060920184533.98954.qmail@web35303.mail.mud.yahoo.com> Received: from [206.255.31.21] by web35303.mail.mud.yahoo.com via HTTP; Wed, 20 Sep 2006 11:45:33 PDT Date: Wed, 20 Sep 2006 11:45:33 -0700 (PDT) From: Andrew Gould To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: extracting base names from package listing X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2006 18:45:37 -0000 pkg_info provides a nice listing of package names that include version numbers. I'd like to have a list of the names without the version numbers so that I can write a script to install the newer versions after a clean installation. Looking at the package names, I'm having a hard time coming up with an algorithm for separating the package names from the version numbers. Many package names have dashes (postgresql-server), and some have letters in the version numbers (libid3tag-0.15.1b). Does anyone have a good way of separating the package names from the version numbers? Is there a better way of identifying and installing a set of packages after a clean installation? Any help would be appreciated. Thanks, Andrew L. Gould