#!/bin/sh #Greetingz to calmar@ #awk Freenode i=0; next_link="http://en.wikipedia.org/w/index.php?title=Special:Allpages&from=%22Mr._Technical%22_Barry_Horowitz" lynx -dump $next_link > temp_dump.txt awk '/[[[:digit:]]]/ {match($0,/\[([1-9]+)\]/, arr); if(int(arr[1]) > 10 && int(arr[1]) < 970 ) print }' temp_dump.txt >> file let "i += 1" echo "Successfully downloaded and saved $i Wikipedia Page articles. The link to the next page is:" next_link=`awk '/ 9./' temp_dump.txt | cut --delimiter=. -f 2- ` echo $next_link while [ "&1" != 0 ] do lynx -dump $next_link > temp_dump.txt awk '/[[[:digit:]]]/ {match($0,/\[([1-9]+)\]/, arr); if(int(arr[1]) > 10 && int(arr[1]) < 970 ) print }' temp_dump.txt >> file let "i += 1" echo "Successfully downloaded and saved $i Wikipedia Page articles. The link to the next page is:" next_link=`awk '/ 9./' temp_dump.txt | cut --delimiter=. -f 2-` echo $next_link done