#!/bin/sh TARGETDIR=$2 mkdir -p $TARGETDIR echo "" > $TARGETDIR/index.html $1/index.pl http://wiki.archlinux.org | while read A; do TITLE=`echo $A | cut -d \ -f 2- | tr ' ' '_'` ID=`echo $A | cut -d \ -f 1` echo "$ID => $TITLE" echo "

$TITLE" >> $TARGETDIR/index.html [ -f "$TARGETDIR/$ID.html" ] || wget -q "http://wiki.archlinux.org/index.php?title=$TITLE&printable=yes" -O "$TARGETDIR/$ID.html" done echo "" >> $TARGETDIR/index.html