NAME
bible - Lookup words and verses in the Bible (King James version)SYNOPSIS
bible [-f] [-l columns] [-m memlimit] [-p path-list] [-d datafile-name] [verse-reference(s)]DESCRIPTION
Bible writes the text of specified Bible verses to stdout. The text used is the Authorized (King James) version. Commands may be given either on the command line, or interactively. Bible also supports instant searches for verses containing a particular word, or combination of words. The program uses a specially-compressed form of the text that allows for rapid random access, while still compressing the original 4.4 Mbyte text into less than 1.8 Mbytes (plus the "concordance" data file, which requires nearly 900 Kbytes).Options
The options to bible are:- -f
- Toggles special output formatting (pretty-printing). By default, pretty-printing is on (a change from earlier versions). When pretty-printing is off, bible precedes each verse with its book/chapter/verse reference. When pretty-printing is on, the book name and chapter are printed on a line by themselves, and only when the chapter or book changes. The start of each verse is indented and preceded by the verse number. The book and chapter names are separated from the text by blank lines to facilitate post-processing by other tools such as adjust. Pretty-printing activates automatic line breaks ( -l)
- -l columns
- When pretty-printing is off, bible prints one verse per line, even though the text may be much longer than will fit on a single line of a display. This is very handy when the output will be processed by other programs, but it doesn't look very nice. The -l option sets a limit on the length of an output line, causing bible to break lines (only between words) to fit. The columns argument is optional; if it is not specified, bible will use the value of the COLUMNS environment variable minus one. If COLUMNS is not set a default value of 79 is used.
- -m memlimit
- Bible normally allocates up to 1 megabyte for buffers to store uncompressed text. If the -m option is present, bible will set the limit to memlimit kilobytes.
- -p path-list
- Bible normally searches for the text data file first in the current directory, and then in /usr/lib. The -p option may be used to change the search path. Path-list should be a list of directories, each separated by a space (be sure to escape them from the shell).
- -d filename
- Bible normally expects to find the text data in a file named bible.data, and the concordance data in bible.data.conc. If the -d option is present, bible will look for a text data file named filename, and a concordance data file named filename.conc instead.
Verse References
Bible accepts verse references in a variety of forms, including single verses and verse ranges. For example:Jn3:16, john3:16,17 ps1:1-6
psalms1
Psalms
Romans3:23 5:8 6:23
1
5:1
1-22
Concordance (Word Searches)
Bible includes a concordance, with which you can immediately find all the verses in which a word appears. The ??word command will select all the references that include word. Bible will display the number of matching references, if any, but since the number could be quite large, it won't actually list the references until you ask. In order to list the references from a word search, the ?list (or ?l) command is used. Likewise, to print the full text of the verses selected by a word search, use the ?view (or ?v) command. The lists for multiple words may be combined using the ?and word and ?or word commands. First create a reference list using the ?? command. For example,??faith
?and love
?and hope
1 Thessalonians 1
3 Remembering without ceasing your work of faith, and labour of
love, and patience of hope in our Lord Jesus Christ, in the
sight of God and our Father;
1 Thessalonians 5
8 But let us, who are of the day, be sober, putting on the
breastplate of faith and love; and for an helmet, the hope of salvation. The ?or word command is similar to ?and, but it produces a combined reference list that is the union of the two lists. In other words, the list includes those verses in which either of the words appears. For example
??angels
?or angel
?in mt1:1-rev22:21
Interactive Use
For interactive use, invoke bible without any verse references on the command line. You should see a prompt displayed:Bible(KJV) [Gen1:1]>
- •
- Bible verse references, as described above.
- •
- Concordance (word search) commands, also described above. These commands are: ??, ?list, ?view, ?and, ?or, and ?in.
- •
- Miscellaneous program control commands:
- ?, ?h, ?help
- Prints help text.
- ?f
- Toggles output formatting modes.
- ?wfile
- Begin writing program output to a file. If file exists, output is appended to what's there already.
- ?w
- Stop writing to a file.
- >, <
- Toggle the direction (forward or backward) in which bible will move through the text when a blank line is entered.
- q, ?bye, ?exit, ?quit, ?q
- End the program.
BUGS
References to the one-chapter books of Philemon and 3 John are non-standard in that they require a dummy chapter number. For example, use Phm1:5 instead of Phm5 to get verse 5. The possessive form 's is handled strangely by the Concordance. The apostrophe has been removed and the s has been treated as if it were a separate word. So, for example, if you wanted to find all references to "refiner's" you would have to first search for "refiner" (using the command ??refiner) and then combine it with a search for "s" (?and s). The convention for handling partial verse specifications can be clumsy. A book name by itself, e.g. "Matthew" is taken as a reference to verse 1:1 of that book. So ?in matt results in a range limit of a single verse (Mt1:1) instead of the whole book as one might hope. Similarly, ?in mt-rev results in a range of Matthew 1:1 to Revelation 1:1, instead of extending all the way to Revelation 22:21.FILES
/usr/lib/bible.dataSEE ALSO
Rev3:20AUTHOR
Chip Chapin, Hewlett Packard Company ([email protected]). The current version uses Lempel-Ziv-Welch compression on the data file, though I modified the "compress" program to emit checkpoints at known intervals to facilitate random access to the data. I call this simple technique "windowed compression", and it could be used for any similar application. The data file can still be uncompressed using the standard "compress" utility if my file header is removed. I would like to gratefully acknowledge the contribution of the authors of the compress program, which I modified for use in the text storage component of bible. As listed in the compress sources they are: Spencer W. Thomas, Jim McKie, Steve Davies, Ken Turkowski, James A. Woods, Joe Orost. Matthew Vernon <[email protected]> has substantially updated a the code of this package. His alterations are made available under the terms of the GNU General Public Licence, version 2 or later, as published by the Free Software Foundation.January 8, 1993 |