Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have downloaded, and installed the current RFC files via zypper, into /usr/share/doc/rfc/. All my RFC files are gzipped.

When I want to find a particular topic, I use this command in my bashrc configuration file as function:

findrfc() {
  for file in /usr/share/doc/rfc/*.gz
  do 
    zcat $file|head -20|grep -i $* && stat -c "%n" $file
  done
}

However, this method is a way too time consuming. Is there a more efficient way, or a program like the "apropos" command for man pages that would accomplish this task?

share|improve this question
    
Please don't add "[Solved]" to your title. Once you can accept your own answer. –  ChrisF Mar 2 '12 at 10:38

2 Answers 2

Did you try rfcutil?

I didn't use it myself, but that's what my packagemanager claims:

* app-text/rfcutil
     Available versions:  3.2.3 (~)3.2.3-r1
     Homepage:            http://www.dewn.com/rfc/
     Description:         return all related RFCs based upon a number or a search string

Update: yes, it works just fine.

valentha qdot # rfc -i
Modem users one moment, it's about 1024k (doesn't need to be updated often)
original lines  = 0     /var/cache/rfc/rfc-index
new lines       = 25078 /var/cache/rfc/rfc-index

valentha qdot # rfc -s Avian  
The Result:
1149 Standard for the transmission of IP datagrams on avian carriers.
     D. Waitzman. April 1 1990. (Format: TXT=3329 bytes) (Updated by
     RFC2549) (Status: EXPERIMENTAL)
2549 IP over Avian Carriers with Quality of Service. D. Waitzman.
     April 1 1999. (Format: TXT=9519 bytes) (Updates RFC1149) (Status:
     INFORMATIONAL)
share|improve this answer
    
Hahaha the April jokes :) –  sinni800 Mar 1 '12 at 22:58
    
qdot: Thanks for this suggestion. So far i downloaded the perl script. but this does not work on my box. any other suggestions. –  l1zard Mar 2 '12 at 0:47
up vote 0 down vote accepted

Once again i am answering my own question

Ok the perl Script qdot suggested tries to find the words in the index file. i was not aware of the existence of such file. Therefore:

rfcfind()
{
zgrep -i $* /usr/share/doc/rfc/rfc-index.txt.gz || echo "no subject found in rfc for $*"
}

is the command i was looking for.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.