đź“„ Read RFCs from the command-line
Shell
Permalink
Failed to load latest commit information.
test
.gitignore Initial import. Mar 23, 2013
.travis.yml end of travis setup Feb 24, 2014
LICENSE
README.md
assert.sh
rfc trailing spaces removed May 18, 2014

README.md

rfc

Build Status

rfc is a little tool written in Bash to read RFCs from the command-line. It fetches RFCs and drafts from the Web and caches them locally.

Usage

Just type rfc followed by the RFC number or the draft name:

$ rfc <RFC num>

e.g.:

rfc 42 # Read the RFC 42
rfc 1234 # Read the RFC 1234
rfc draft-ietf-core-coap-18 # Read IETF draft core-coap version 18

Use rfc help to see all available subcommands.

Options

  • --version: same as the version subcommand
  • --help: same as the help subcommand

Return codes

  • 0: normal execution
  • 1: the RFC cannot be found
  • 2: unrecognized option/subcommand
  • 3: unable to connect to the network
  • 4: can't find curl nor wget

Install

Basic install

mkdir -p ~/bin
curl -sL https://raw.github.com/bfontaine/rfc/master/rfc > ~/bin/rfc
chmod u+x ~/bin/rfc

This creates the ~/bin directory if it doesn’t exist, and download rfc in it. If it’s not in your PATH, you have to add it:

echo 'export PATH="$HOME/bin:$PATH"' >> ~/.bashrc

Using Homebrew

If you use Homebrew or Linuxbrew you can install rfc with one command:

brew install bfontaine/utils/rfc

Requirements

  • curl or wget (it’ll try $CURL, curl and wget, in that order)
  • less or another pager

Customization

You can choose which directory rfc will use by setting the RFC_DIR environment variable. The directory is automatically created if it doesn’t exist.

Credits

Baptiste Fontaine and contributors.