Bug#368383: dumb "manual page for..." NAME section on many man pages
This mostly works for '.deb' files.
# print the archive name and the 'whatis' line of any man pages in it.
dope() { D=$1 ; dpkg-deb -c $D | grep '^-.*man' | while read a b c d e f ; do echo $f ; done | while read x ; do basename $x ; done | tr . ' ' | while read a b c ; do L="`bash debman -f $D $b $a 2> /dev/null | grep -m 1 -A 1 "NAME" | tail -n 1`"; [ "$L" ] && echo "$D , $a.$b:$L" ; done ; }
Example:
% dope bash_3.1-4_i386.deb
bash_3.1-4_i386.deb , bash.1: bash - GNU Bourne-Again SHell
bash_3.1-4_i386.deb , bashbug.1: bashbug - report a bug in bash
bash_3.1-4_i386.deb , clear_console.1: clear_console - clear the cons ole
bash_3.1-4_i386.deb , rbash.1: rbash - restricted bash, see bash(1)
bash_3.1-4_i386.deb , bash-builtins.7: bash-builtins - bash built-in commands, see bash(1)
Doesn't check for hard or soft links, yet.
Change to a dir with lots of '.deb' files, and this runs slow:
for f in *.deb ; do dope $f ; done | grep "manual page for"
HTH...
Reply to: