From owner-freebsd-questions Thu Mar 23 11:46:52 2000 Delivered-To: freebsd-questions@freebsd.org Received: from globnix.org (athenaeum.psidev.net [194.159.247.11]) by hub.freebsd.org (Postfix) with ESMTP id 2D78C37BE50 for ; Thu, 23 Mar 2000 11:46:34 -0800 (PST) (envelope-from phil@globnix.org) Received: (from phil@localhost) by globnix.org (8.9.3/8.9.3) id TAA29005 for freebsd-questions@FreeBSD.ORG; Thu, 23 Mar 2000 19:46:28 GMT Date: Thu, 23 Mar 2000 20:46:28 +0100 From: Phil Pennock To: freebsd-questions@FreeBSD.ORG Subject: Submitting a program Message-ID: <20000323204628.A10998@athenaeum.globnix.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i Organisation: Organisation? Here? No, over there ----> X-NIC-Handles: COCO-149560 (ignore PP8185) X-Disclaimer: Any views expressed in this message, where not explicitly attributed otherwise, are mine and mine alone. Such views do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. X-Phase-of-Moon: The Moon is Waning Gibbous (86% of Full) Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, I just hacked up a quick script, which I can't believe I'd be the only user of. I've scanned the website, but can't see where I send it to in order to submit it. It's part of the pkg maintenance stuff, and just tells you which package 'owns' files by that name. If there's already a way of doing this with pkg_info(1) under FreeBSD3.4 then could someone please point me to the documentation for it. Ta. Given that it's so short, I'll just include it here and have done with it. However, I would like to know how I'm supposed to submit it. I call it: pkg_which -----------------------------< cut here >------------------------------- #!/bin/sh cd /var/db/pkg for i in "$@" do egrep -l -- "^[^@](.*/)?$i\$" */+CONTENTS | cut -d / -f 1 done -----------------------------< cut here >------------------------------- I hereby grant permission to release that under a *BSD license. :^) HTH HAND -- --> Phil Pennock, DeathWatch Admin. "We've got a patent on the conquering of a country through the use of force. We believe in world peace through extortionate license fees." -Bluemeat To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message