[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: package



Il giorno Thu, 01 Nov 2007 16:52:50 +0100
Mathias Brodala <info@noctus.net> ha scritto:

> Hi.
> 
> ann kok, 01.11.2007 16:39:
> > what is package including command ip addr?
> 
> The command "ip" is in the "iproute" package.
> 
> > how can I know the package info?
> 
> # apt-get install apt-file
> # apt-file update
> $ apt-file search `which ip`

I'd suggest piping the result through grep. In fact, you get every file name
containing "/bin/ip".

This means:

$ apt-file search `which ip` | grep "ip$"

which will get all the paths _ending_ with "ip".

A better, and more *general* approach would involve some sed magic:

$ prog=`which <program>`
$ apt-file search $prog | grep "$(echo $prog | sed 's/^\///g')$"

HTH,
David

-- 
 . ''`.  Debian maintainer | http://snipurl.com/qa_page/
 : :'  :  Linuxer #334216  |  http://www.hanskalabs.net/
 `. `'`    GPG: 1392B174   | http://www.debianizzati.org/
   `-   2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174

Attachment: signature.asc
Description: PGP signature


Reply to: