Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Describe all Unix apps in current PATH' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Describe all Unix apps in current PATH
Authored by: gshenaut on Jan 09, '07 08:57:51AM
Well, formatting helps a little:
echo $PATH \
| sed -e 's/:/ /g' \
| xargs -J % find % -maxdepth 1 \( -type f -or -type l \) \
| xargs basename | sort | uniq \
| xargs whatis 2> /dev/null \
| grep -E '\((1|1m|6|8)\)' \
| perl -ne '($name, $descrip) = m/^(.*?)\s+- (.*)$/; $name =~ s/\((1|1m|6|8)\)//g; printf("%-20s - %s\n", $name, $descrip)'
Greg Shenaut

[ Reply to This | # ]