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

Re: Installierte Dateien



Hallo,

Goran wrote:
> ich habe ein Problem mit der Ausgabe von "dpkg --listfiles <Paketname>".
> Und zwar möchte ich nur die Dateinamen ohne die Pfadangabe lesen. Ein
> Beispiel:

basename ist dein Freund.

> So war es bisher...
> # dpkg --listfiles mount
> /.
> /bin
> /bin/mount
> /bin/umount
> /sbin
> /sbin/swapon
> /sbin/losetup
> <--Schnipp-->
> 
> So soll es sein...
> # unbekannter Befehl
> mount
> umount
> swapon
> losetu
> <--Schnipp-->

dpkg --listfiles mount | while read i; do if [ ! -d "$i" ] ; then
basename "$i"; fi; done;

HTH,
Moritz

-- 
Moritz Lenz
http://moritz.faui2k3.org/

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: