help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Breaking news: What did the IETF ever do for us? The *entire* list!


From: Emanuel Berg
Subject: Breaking news: What did the IETF ever do for us? The *entire* list!
Date: Thu, 02 Apr 2015 04:31:31 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

The RFC memos and specifications - published by the
semi-mythical IETF - are available in the Debian
repositories as the non-free 'doc-rfc' metapackage.

After installation ('sudo aptitude install doc-rfc')
the files can be inspected in /usr/share/doc/RFC.
They are all in .gz format, but one can unzip them
with gunzip to get a neat 407M directory instead. Win!
This makes it easier to manipulate the files with
familiar and unfamiliar tools alike.

Now it gets interesting. I wrote this zsh function to
search the RFCs:

    search-rfc () {
        local search=$1
        files=("${(@f)$(grep -i $search -l /usr/share/doc/RFC/*/**.txt)}")
        for f in $files; do
            local data=`grep -c -H -i $search $f`
            local occs=${data##*:}
            local filename=${data%:*}
            echo $occs\\t$filename
        done | sort -n -r
    }

So now I can answer the question: What did the IETF
ever do for us? The first column is the number of hits
for the search string, in the document to the right:

"Emacs"

    7       /usr/share/doc/RFC/for-your-information/rfc1580.txt
    5       /usr/share/doc/RFC/informational/rfc2629.txt
    5       /usr/share/doc/RFC/informational/rfc1056.txt
    3       /usr/share/doc/RFC/queue/draft-ietf-lisp-22.txt
    2       /usr/share/doc/RFC/proposed-standard/rfc6120.txt
    2       /usr/share/doc/RFC/informational/rfc1554.txt
    1       /usr/share/doc/RFC/unclassified/rfc1003.txt
    1       /usr/share/doc/RFC/proposed-standard/rfc4833.txt
    1       /usr/share/doc/RFC/proposed-standard/rfc1144.txt
    1       /usr/share/doc/RFC/links/rfc1957.txt
    1       /usr/share/doc/RFC/informational/rfc2223.txt
    1       /usr/share/doc/RFC/informational/rfc1957.txt
    1       /usr/share/doc/RFC/informational/rfc1842.txt
    1       /usr/share/doc/RFC/informational/rfc1599.txt
    1       /usr/share/doc/RFC/historic/rfc1422.txt
    1       /usr/share/doc/RFC/historic/rfc1203.txt
    1       /usr/share/doc/RFC/for-your-information/rfc1689.txt

"Elisp":

    5       /usr/share/doc/RFC/proposed-standard/rfc4444.txt
    1       /usr/share/doc/RFC/for-your-information/rfc1580.txt
    ...     ...

"Gnus":

    8       /usr/share/doc/RFC/informational/rfc2808.txt
    6       /usr/share/doc/RFC/proposed-standard/rfc4867.txt
    6       /usr/share/doc/RFC/informational/rfc6064.txt
    4       /usr/share/doc/RFC/proposed-standard/rfc3611.txt
    3       /usr/share/doc/RFC/proposed-standard/rfc5993.txt
    3       /usr/share/doc/RFC/proposed-standard/rfc5404.txt
    3       /usr/share/doc/RFC/proposed-standard/rfc4352.txt
    3       /usr/share/doc/RFC/proposed-standard/rfc3767.txt
    3       /usr/share/doc/RFC/proposed-standard/rfc2228.txt
    3       /usr/share/doc/RFC/informational/rfc4613.txt
    ...     ...

Dig, diggers!

-- 
underground experts united
http://user.it.uu.se/~embe8573


reply via email to

[Prev in Thread] Current Thread [Next in Thread]