On Thu, Nov 01, 2007 at 18:15:48 +0100, David Paleino wrote:
> Il giorno Thu, 01 Nov 2007 16:52:50 +0100
> Mathias Brodala <[EMAIL PROTECTED]> 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')$"

If <program> is not installed then `which <program>` will not return
anything useful.

If <program> is already installed then there is no need to use apt-file;
"dpkg -S <program>" and "dlocate <program>" are faster.

-- 
Regards,            | http://users.icfo.es/Florian.Kulzer
          Florian   |


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to