Phone Phone Book Search 1.0 Phone Book Search _____ ____ ______ ********* * phone * ********* NAME: phone -- Phone Book Search SYNOPSIS: phone [-f file] arg[s] DESCRIPTION: Phone searches a user-defined phone book file for any entry that matches any argument in the argument list. The phone book, normally stored in file phone.txt, may be created by any standard editor. It contains lines of text, such as: Digital Equipment DEC (617) 897-5111 Note that phone does not impose any format on the text, only that the text consist of words, separated by blanks. If a line starts with whitespace (blank or tab), it is considered to be a continuation of the previous line: Digital Equipment DEC (617) 897-5111 146 Main Street, Maynard, MA 01754 The example line would be printed by, e.g., phone dig or phone DEC Searches skip over continuation lines. In a search argument, two "wild-cards" are recognized: * matches any string of characters, even null. ? matches a single non-null character. Note that "phone *" will print the entire phone book. Each match argument will be implicitly terminated by '*'. Thus, a search argument of "ma" will match "Martin". Upper- and lower-case are ignored in comparisons. If no wild-card characters are present in an argument, a Page 2 Phone Phone Book Search "Soundex" match will be used. This permits matches even if you have (slightly) misspelled the name for which you are searching. If phone is invoked without an argument, it will prompt for arguments, outputting all matches. If the standard input is redirected and no argument is given, phone may be used as a filter. If a "-f filename" argument is given on the command line, phone searches the indicated file. Otherwise, it tries to locate a phone book file using the following search list: phone.txt e:phone.txt a:phone.txt For optimal Search-speed , the above example line should be formatted as: Digital Equipment DEC 146 Main Street, Maynard, MA 01754 (617) 897-5111 ACKNOWLEDGEMENTS: The Soundex algorithm was invented by Margaret K. Odell and Robert C. Russell. U.S. patents 1261167 (1918) and 1435663 (1922). The version used here was modified from one described in Donald Knuth, Sorting and Searching. AUTHORS: Martin Minow J. Anthony Movshon (MSDOS conversion) B. Eiben (DEC Marlboro) CPM 80/86 Version using AZTEC C.