Re: how to find which port has a given executable

2005-03-24 Thread Alex Zbyslaw
Christopher Nehren wrote:
On 2005-03-23, Alex Zbyslaw scribbled these
curious markings:
 

% find /usr/ports -type f -name pkg-plist -exec egrep -H epstopdf {} \;
   

Just a bit of nitpickery: I've found that piping the output to xargs
rather than using find's exec produces faster results. Plus, you (most
of the time) don't need to use constructs like {} \;. :)
 

I've been typing it like this for 20 years and my fingers can type {} \; 
faster than a speeding bullet, or at least a run-away zimmer frame.  
Leave us old fogeys in peace.  You and your new fangled commands 
starting with x that aren't X11 applications.  If it wasn't in 4.1BSD it 
isn't worth using.  Anyway, the manual page for xargs just makes my 
brain hurt. :)

Charles Swiger wrote: On Mar 23, 2005, at 1:22 PM,
pkg_which epstopdf
...is probably even faster and easier.
% pkg_which epstopdf
epstopdf: not found
Just like pkg_info -W it doesn't seem to work unless the package is 
installed

--Alex
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


how to find which port has a given executable

2005-03-23 Thread Rajarajan Rajamani
Hi,
 I had asked this in a slightly different post but there was no reply
so I am posting again.

Is it possible to find out which port has a particular
executable/script file ? It took me some time to find
out if the script epstopdf was in latex or tex or tetex!

Any easy way to do this ?

Regards,

Rajarajan
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: how to find which port has a given executable

2005-03-23 Thread Michael C. Shultz
On Wednesday 23 March 2005 09:33 am, Rajarajan Rajamani wrote:
 Hi,
  I had asked this in a slightly different post but there was no reply
 so I am posting again.

 Is it possible to find out which port has a particular
 executable/script file ? It took me some time to find
 out if the script epstopdf was in latex or tex or tetex!

 Any easy way to do this ?

 Regards,

 Rajarajan

Here is an example:

pkg_info -W /usr/X11R6/bin/nedit
/usr/X11R6/bin/nedit was installed by package nedit-5.5

-Mike
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: how to find which port has a given executable

2005-03-23 Thread Alex Zbyslaw
Michael C. Shultz wrote:
Is it possible to find out which port has a particular
executable/script file ? It took me some time to find
out if the script epstopdf was in latex or tex or tetex!
Any easy way to do this ?
   

Here is an example:
pkg_info -W /usr/X11R6/bin/nedit
/usr/X11R6/bin/nedit was installed by package nedit-5.5
 

I think the question might have been about a file from port which wasn't 
yet installed, in which case it's a little more time consuming:

% find /usr/ports -type f -name pkg-plist -exec egrep -H epstopdf {} \;
/usr/ports/chinese/cwtex/pkg-plist:share/texmf/cwtex/help/epstopdf.txt
/usr/ports/print/teTeX-base/pkg-plist:bin/epstopdf
/usr/ports/print/teTeX-texmf/pkg-plist:%%TEXMFDISTDIR%%/doc/help/Catalogue/entries/epstopdf.html
/usr/ports/print/teTeX-texmf/pkg-plist:%%TEXMFDISTDIR%%/tex/latex/oberdiek/epstopdf.sty
/usr/ports/textproc/rubber/pkg-plist:%%PYTHON_SITELIBDIR%%/rubber/graphics/epstopdf.py
/usr/ports/textproc/rubber/pkg-plist:%%PYTHON_SITELIBDIR%%/rubber/graphics/epstopdf.pyc
/usr/ports/japanese/ptex-common/pkg-plist:bin/epstopdf
--Alex
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: how to find which port has a given executable

2005-03-23 Thread Christopher Nehren
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 2005-03-23, Alex Zbyslaw scribbled these
curious markings:
 % find /usr/ports -type f -name pkg-plist -exec egrep -H epstopdf {} \;

Just a bit of nitpickery: I've found that piping the output to xargs
rather than using find's exec produces faster results. Plus, you (most
of the time) don't need to use constructs like {} \;. :)

Best Regards,
Christopher Nehren
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (FreeBSD)

iD8DBQFCQbSzk/lo7zvzJioRAirsAJ9oq+xJr6AHgscuUXBIzWvvsa33mgCeOnz5
8JesEMbAHU9K0SAgpb8B7eo=
=nKZB
-END PGP SIGNATURE-

-- 
I abhor a system designed for the user, if that word is a coded
pejorative meaning stupid and unsophisticated. -- Ken Thompson
If you ask the wrong questions, you get answers like 42 and God.
Unix is user friendly. However, it isn't idiot friendly.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: how to find which port has a given executable

2005-03-23 Thread Charles Swiger
On Mar 23, 2005, at 1:22 PM, Christopher Nehren wrote:
On 2005-03-23, Alex Zbyslaw scribbled these
curious markings:
% find /usr/ports -type f -name pkg-plist -exec egrep -H epstopdf {} 
\;
Just a bit of nitpickery: I've found that piping the output to xargs
rather than using find's exec produces faster results. Plus, you (most
of the time) don't need to use constructs like {} \;. :)
pkg_which epstopdf
...is probably even faster and easier.
--
-Chuck
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: how to find which port has a given executable

2005-03-23 Thread Roland Smith
On Wed, Mar 23, 2005 at 12:33:13PM -0500, Rajarajan Rajamani wrote:
 Is it possible to find out which port has a particular
 executable/script file ? It took me some time to find
 out if the script epstopdf was in latex or tex or tetex!

pkg_which, from the portupgrade port works very nicely for this.

Roland
-- 
R.F. Smith   /\ASCII Ribbon Campaign
r s m i t h @ x s 4 a l l . n l  \ /No HTML/RTF in e-mail
http://www.xs4all.nl/~rsmith/ X No Word docs in e-mail
public key: http://www.keyserver.net / \Respect for open standards


pgpsD4SrQm6Xz.pgp
Description: PGP signature


pkg_info -W useless for symlink-accessible command (was Re: how to find which port has a given executable)

2005-03-23 Thread Parv
in message [EMAIL PROTECTED],
wrote Michael C. Shultz thusly...

 pkg_info -W /usr/X11R6/bin/nedit
 /usr/X11R6/bin/nedit was installed by package nedit-5.5

(I tried on 5.3-p5; used to have same issue on 4.6-4.11.)

I always had problems w/ that as so far i tried only the file name,
w/o the path.  So pkg_info -W /misc/local/bin/s2p gives ...

  /misc/local/bin/s2p was installed by package perl-5.8.6_2


... but pkg_info -W s2p produces nothing, even though the man page
says ...

  -W  For the specified filename argument show which package it
  belongs to.  If the file is not in the current directory, and
  does not have an absolute path, then the PATH is searched using
  which(1).


BTW, which s2p gives ...

  /usr/local/bin/s2p

  (where /usr/local is symlinked to /misc/local.)


Apparently pkg_info -W is useless unless the *real path* is given.
A quick/dirty wrapper would be (works in bash3  sh) then ...

  for cmd in $@
  do
pkg_info -W  $(realpath $(which $cmd))
  done


  - Parv

-- 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]