#!/bin/sh

wget -O rfc4614.txt http://tools.ietf.org/rfc/rfc4614.txt


for RFC in `grep "\[RFC" rfc4614.txt | sed -e "s/^.*RFC/rfc/" | grep -v "rfc \|rfc$" | sed -e "s/\].*$/.txt/g" |sort |uniq`; do
	wget -O ${RFC} http://tools.ietf.org/rfc/${RFC}
done

wget -O rfc3927.txt http://tools.ietf.org/rfc/rfc3927.txt

# Get PPP related RFC's
for RFC in $(echo 1332 1334 1661 1662 1877 1994 | sed -r "s/[^ ]+/rfc&.txt/g"); do
	wget -O ${RFC} http://tools.ietf.org/rfc/${RFC}
done
