|
NAMEbible - Lookup words and verses in the Bible (King James version)SYNOPSISbible [-f] [-l columns] [-m memlimit] [-p path-list] [-d datafile-name] [verse-reference(s)]DESCRIPTIONBible 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).OptionsThe options to bible are:
Verse ReferencesBible accepts verse references in a variety of forms, including single verses and verse ranges. For example:Jn3:16, john3:16,17 ps1:1-6 Most recognizable abbreviations are allowed, and spelling errors are ignored if the book can be made out in the first few characters. No distinction is made between upper and lower case. Multiple references may be provided on an input line, delimited by spaces or commas. Verse and chapter will be silently coerced into a realistic range, e.g. "Ps1:87" will be treated as Psalm 1:6 since there are only six verses in Psalm 1, and "Rev99:99" will be treated as Revelation 22:21 (the last verse in the Bible). A book name by itself is assumed to be a reference to chapter 1, verse 1 of that book, i.e. "Acts" is the same as "Acts1:1". Similarly, a book and chapter without a verse is assumed to refer to verse one of that chapter. A range of verses may be printed by giving a starting and ending reference, separated by a hyphen ("-"). For example, "Gen1:1-Rev22:21" will dump the entire text (about 4.4 MB). Bible keeps track of your current context and will attempt to interpret references in that context. For example if you request "John1:1", followed by "3:16", and then "17", the second reference is assumed to be within the book of John, and the third is assumed to be within chapter 3 of that book. An empty reference, e.g. a blank line on the input, will show the next verse following the last one displayed. More examples of legal verse references: 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 will find 231 references to the word "faith". To narrow the list further, the command ?and love will inform you that, while there were 281 references to "love", only 16 of them were also in the previous reference list (i.e. contained both words). The "combined list" of 16 references produced by the ?and word command is the intersection of the two lists, and replaces the original reference list. The ?list and ?view commands will now apply to the combined list. You can continue to apply the ?and command to the combined list. For example, ?and hope will further narrow the combined list to only two references. Typing ?view then displays the full text: 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 will find all 283 verses in wich either word is used. By default, reference lists cover the entire Bible. But for those times when it is useful to limit them to a particular section of the text, bible provides the ?in verse range command. For example ?in mt1:1-rev22:21 will limit future reference lists to the New Testament. If you have a current reference list, references that fall outside the limits will be dropped. Note that only a contiguous range of verses may be used. To reset the limits so that the whole text is searched, the command is ?in all. Interactive UseFor interactive use, invoke bible without any verse references on the command line. You should see a prompt displayed:Bible(KJV) [Gen1:1]> Typing ? will print a command summary. The program accepts three types of interactive command input:
BUGSReferences 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/local/lib/bible.data/usr/local/lib/bible.data.conc SEE ALSORev3:20AUTHORChip Chapin, Hewlett Packard Company (chip@cup.hp.com).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 <matthew@debian.org> 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.
Visit the GSP FreeBSD Man Page Interface. |