11 ms·
whatis -s1 $(dpkg -L coreutils | grep "bin/" | sed 's,^.*\/,,') Should work too (and be a lot faster).
by gmartres 14y ago
whatis -s1 $(dpkg -L coreutils | grep "bin/" | sed 's,^.*\/,,')
Should work too (and be a lot faster).
- dredmorbius 14y agoNice. I was trying to remember how to extract the summary lines by themselves. And yes, it's much faster (fewer execs, less manpage formatting and parsing). Note that your solution skips chroot (man section 8). The fix: whatis -s1,8 $(dpkg -L coreutils | grep "bin/" | sed 's,^.*\/,,')
- pixelbeat 14y agoCool! Here is an rpm variant with simplified sed: whatis -s1 $(rpm -ql coreutils | sed -n 's,.*/bin/,,p')