slitaz-tools view tinyutils/man @ rev 228

Add man
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Jul 11 11:08:27 2008 +0000 (2008-07-11)
parents
children dd528df4281e
line source
1 #!/bin/sh
2 SECTION=all
3 if [ -n "$2" ]; then
4 SECTION=$1
5 shift
6 fi
7 TOPIC=$1
8 wget -O - "http://man.he.net/?topic=$TOPIC&section=$SECTION" 2> /dev/null | \
9 awk 'BEGIN { s=0 } /<PRE>/ { s=1 } { if (s) print } /<\/PRE>/ { s=0 }' | \
10 sed -e 's/<[^>]*>//g' -e 's/&lt;/</g' -e 's/&gt;/>/g' -e 's/&amp;/&/g' | less