slitaz-tools rev 228
Add man
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Jul 11 11:08:27 2008 +0000 (2008-07-11) |
parents | 74935d005590 |
children | 5c0f59e46c0e |
files | tinyutils/man |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/tinyutils/man Fri Jul 11 11:08:27 2008 +0000 1.3 @@ -0,0 +1,10 @@ 1.4 +#!/bin/sh 1.5 +SECTION=all 1.6 +if [ -n "$2" ]; then 1.7 + SECTION=$1 1.8 + shift 1.9 +fi 1.10 +TOPIC=$1 1.11 +wget -O - "http://man.he.net/?topic=$TOPIC§ion=$SECTION" 2> /dev/null | \ 1.12 +awk 'BEGIN { s=0 } /<PRE>/ { s=1 } { if (s) print } /<\/PRE>/ { s=0 }' | \ 1.13 +sed -e 's/<[^>]*>//g' -e 's/</</g' -e 's/>/>/g' -e 's/&/&/g' | less