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

was nützliches!?



Hallo,

ich weiss nicht, ob das hier hingehört oder ob es das schon gibt mit
apt, dpkg, ...

auf jeden Fall erspart es mir eine Menge Rumsucherei. Vielleicht kanns
ja jemand gebrauchen...


Gruss,

Frederik
#!/bin/bash
#
# - search a file in all available packages in your dist
#   and print out the package-name
# - run `apt-file update` to retrieve the newest
#   version of the Contents-files
# - check the names of these (stored in /var/cache/apt/)
#   and write to the list "contents_files" below
#   
#   
contents_files='ftp.debian.de_debian_dists_unstable_Contents-i386.gz marillat.free.fr_dists_unstable_Contents-i386.gz'
file=$1
for i in $contents_files;do
	zgrep $file /var/cache/apt/$i | awk '{OFS="\t\t"} $1~/\/'$file'$/{print $1, $2}'
done

Reply to: