5 ms·
GNO Coreutils Cheat Script (debian/ubuntu and other apt-based distros version): for pgm in $( dpkg -L coreutils | grep bin | sed 's,^.*\/,,' ); do
by dredmorbius 14y ago
GNO Coreutils Cheat Script (debian/ubuntu and other apt-based distros version):
for pgm in $( dpkg -L coreutils | grep bin |
sed 's,^.*\/,,' ); do
man $pgm 2>/dev/null | sed -ne '6p'; done
- gmartres 14y agowhatis -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')