Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

    whatis -s1 $(dpkg -L coreutils | grep "bin/" | sed 's,^.*\/,,')
Should work too (and be a lot faster).


Nice. 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,^.*\/,,')


Cool! Here is an rpm variant with simplified sed:

    whatis -s1 $(rpm -ql coreutils | sed -n 's,.*/bin/,,p')




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: