# HG changeset patch # User Pascal Bellard # Date 1215854574 0 # Node ID 11a5f41f36a24d0c1b6e95ec8e0475f1e3ed4b41 # Parent c1d9f377135bccff2b8a00c141a411e8ef28673f man: add 'No manual entry' diff -r c1d9f377135b -r 11a5f41f36a2 tinyutils/man --- a/tinyutils/man Fri Jul 11 19:42:05 2008 +0000 +++ b/tinyutils/man Sat Jul 12 09:22:54 2008 +0000 @@ -8,11 +8,18 @@ exit 1;; esac SECTION=all +MSG="" if [ -n "$2" ]; then SECTION=$1 + MSG=" in section $SECTION" shift fi TOPIC=$1 +#http://www.penguin-soft.com/penguin/man?q=$TOPIC§ion=ALL&action=man +#http://linuxreviews.org/man/$TOPIC/index.html.en +#http://www.mediacollege.com/cgi-bin/man/page.cgi?topic=$TOPIC +#http://www.linuxcertif.com/man/$SECTION/$TOPIC/ +#http://casper.ict.hen.nl/cgi-bin/man2html?+$TOPIC+$SECTION wget -O - "http://man.he.net/?topic=$TOPIC§ion=$SECTION" 2> /dev/null | \ -awk 'BEGIN { s=0 } /
/ { s=1 } { if (s) print } /<\/PRE>/ { s=0 }' | \
+awk "BEGIN { s=0; n=0 } /
/ { s=1 } { if (s) { print; n++} } /<\/PRE>/ { s=0 } END { if (n == 0) print \"No manual entry for $TOPIC$MSG\" }" | \
 sed -e 's/<[^>]*>//g' -e 's/<//g' -e 's/&/\&/g' | less -M