# HG changeset patch # User Rob Landley # Date 1193132026 18000 # Node ID fa8bf02e7cfab635a83c3d0b2d48e4a81cffb41a # Parent 4b9263d24970ed13686ffacbc92032cd0b02a5f0 Script to search Linux kernel for mentions of ietf RFC documents and make a page linking to the files and the appropriate RFC. diff -r 4b9263d24970 -r fa8bf02e7cfa make/findrfc.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/make/findrfc.sh Tue Oct 23 04:33:46 2007 -0500 @@ -0,0 +1,41 @@ +#!/bin/bash + +export LINUXDIR=~/linux/hg/ + +#> temp-linuxrfc.txt + +function findrfc() +{ + x=0 + for i in `find "$LINUXDIR" -name "*.[hc]"` + do + x=$[$x+1] + if [ $x -gt 250 ] + then + echo -n . >&2 + x=0 + fi + for j in `grep -io "rfc *[1-9][0-9]*" $i | grep -v " " | sed -r 's/[Rr][Ff][Cc] *([0-9]*)/rfc\1/g'` + do + echo $i:$j + done + done +} + +echo -n Finding RFC comments >&2 +#findrfc > temp-linuxrfc.txt + +echo "RFCs used by the Linux kernel" +echo "" + +#rm temp-linuxrfc.txt