UNIX/32V - Summary March 9, 1979 _A. _W_h_a_t'_s _n_e_w: _h_i_g_h_l_i_g_h_t_s _o_f _t_h_e _U_N_I_X|-/_3_2_V _S_y_s_t_e_m _3_2-_b_i_t _w_o_r_l_d. UNIX/32V handles 32-bit addresses and 32-bit data. Devices are addressable to 28319 bytes, files to 2830 9bytes. _P_o_r_t_a_b_i_l_i_t_y. Code of the operating system and most utili- ties has been extensively revised to minimize its dependence on particular hardware. UNIX/32V is highly compatible with UNIX version 7. _F_o_r_t_r_a_n _7_7. F77 compiler for the new standard language is compatible with C at the object level. A Fortran struc- turer, STRUCT, converts old, ugly Fortran into RATFOR, a structured dialect usable with F77. _S_h_e_l_l. Completely new SH program supports string variables, trap handling, structured programming, user profiles, sett- able search path, multilevel file name generation, etc. _D_o_c_u_m_e_n_t _p_r_e_p_a_r_a_t_i_o_n. TROFF phototypesetter utility is standard. NROFF (for terminals) is now highly compatible with TROFF. MS macro package provides canned commands for many common formatting and layout situations. TBL provides an easy to learn language for preparing complicated tabular material. REFER fills in bibliographic citations from a data base. _U_N_I_X-_t_o-_U_N_I_X _f_i_l_e _c_o_p_y. UUCP performs spooled file transfers between any two machines. _D_a_t_a _p_r_o_c_e_s_s_i_n_g. SED stream editor does multiple editing functions in parallel on a data stream of indefinite length. AWK report generator does free-field pattern selection and arithmetic operations. _P_r_o_g_r_a_m _d_e_v_e_l_o_p_m_e_n_t. MAKE controls re-creation of compli- cated software, arranging for minimal recompilation. _________________________ |- UNIX is a Trademark of Bell Laboratories. August 27, 1987 PS2:2-2 UNIX 32/V - Summary _D_e_b_u_g_g_i_n_g. ADB does postmortem and breakpoint debugging. _C _l_a_n_g_u_a_g_e. The language now supports definable data types, generalized initialization, block structure, long integers, unions, explicit type conversions. The LINT verifier does strong type checking and detection of probable errors and portability problems even across separately compiled func- tions. _L_e_x_i_c_a_l _a_n_a_l_y_z_e_r _g_e_n_e_r_a_t_o_r. LEX converts specification of regular expressions and semantic actions into a recognizing subroutine. Analogous to YACC. _G_r_a_p_h_i_c_s. Simple graph-drawing utility, graphic subrou- tines, and generalized plotting filters adapted to various devices are now standard. _S_t_a_n_d_a_r_d _i_n_p_u_t-_o_u_t_p_u_t _p_a_c_k_a_g_e. Highly efficient buffered stream I/O is integrated with formatted input and output. _O_t_h_e_r. The operating system and utilities have been enhanced and freed of restrictions in many other ways too numerous to relate. August 27, 1987 UNIX 32/V - Summary PS2:2-3 _B. _H_a_r_d_w_a_r_e The UNIX/32V operating system runs on a DEC VAX-11/780* with at least the following equipment: memory: 256K bytes or more. disk: RP06, RM03, or equivalent. tape: any 9-track MASSBUS-compatible tape drive. The following equipment is strongly recommended: communications controller such as DZ11 or DL11. full duplex 96-character ASCII terminals. extra disk for system backup. The system is normally distributed on 9-track tape. The minimum memory and disk space specified is enough to run and maintain UNIX/32V, and to keep all source on line. More memory will be needed to handle a large number of users, big data bases, diversified complements of devices, or large programs. The resident code occupies 40-55K bytes depending on configuration; system data also occupies 30-55K bytes. _C. _S_o_f_t_w_a_r_e Most of the programs available as UNIX/32V commands are listed. Source code and printed manuals are distributed for all of the listed software except games. Almost all of the code is written in C. Commands are self-contained and do not require extra setup information, unless specifically noted as ``interactive.'' Interactive programs can be made to run from a prepared script simply by redirecting input. Most programs intended for interactive use (e.g., the edi- tor) allow for an escape to command level (the Shell). Most file processing commands can also go from standard input to standard output (``filters''). The piping facility of the Shell may be used to connect such filters directly to the input or output of other programs. _1. _B_a_s_i_c _S_o_f_t_w_a_r_e This includes the time-sharing operating system with utilities, and a compiler for the programming language C- enough software to write and run new applications and to maintain or modify UNIX/32V itself. _________________________ *VAX is a Trademark of Digital Equipment Corporation. August 27, 1987 PS2:2-4 UNIX 32/V - Summary _1._1. _O_p_e_r_a_t_i_n_g _S_y_s_t_e_m [] UNIX The basic resident code on which everything else depends. Supports the system calls, and maintains the file system. A general description of UNIX design philosophy and system facilities appeared in the Communications of the ACM, July, 1974. A more extensive survey is in the Bell System Techn- ical Journal for July-August 1978. Capabilities include: O Reentrant code for user processes. O ``Group'' access permissions for cooperative projects, with overlapping memberships. O Alarm-clock timeouts. O Timer-interrupt sampling and interprocess moni- toring for debugging and measurement. O Multiplexed I/O for machine-to-machine communi- cation. 9[] DEVICESAll I/O is logically synchronous. I/O devices are simply files in the file system. Normally, invisible buffering makes all physical record structure and device characteristics transparent and exploits the hardware's ability to do over- lapped I/O. Unbuffered physical record I/O is available for unusual applications. Drivers for these devices are available: O Asynchronous interfaces: DZ11, DL11. Support for most common ASCII terminals. O Automatic calling unit interface: DN11. O Printer/plotter: Versatek. O Magnetic tape: TE16. O Pack type disk: RP06, RM03; minimum-latency seek scheduling. O Physical memory of VAX-11, or mapped memory in resident system. O Null device. O Recipies are supplied to aid the construction of drivers for: Asynchronous interface: DH11. Synchronous interface: DU11. DECtape: TC11. Fixed head disk: RS11, RS03 and RS04. Cartridge-type disk: RK05. Phototypesetter: Graphic Systems System/1 through DR11C. 9[] BOOT Procedures to get UNIX/32V started. _1._2. _U_s_e_r _A_c_c_e_s_s _C_o_n_t_r_o_l 99[] LOGIN Sign on as a new user. O Verify password and establish user's individual and group (project) identity. O Adapt to characteristics of terminal. O Establish working directory. August 27, 1987 UNIX 32/V - Summary PS2:2-5 O Announce presence of mail (from MAIL). O Publish message of the day. O Execute user-specified profile. O Start command interpreter or other initial pro- gram. 9[] PASSWD Change a password. O User can change his own password. O Passwords are kept encrypted for security. 9[] NEWGRP Change working group (project). Protects against unauthorized changes to projects. _1._3. _T_e_r_m_i_n_a_l _H_a_n_d_l_i_n_g 99[] TABS Set tab stops appropriately for specified terminal type. 9[] STTY Set up options for optimal control of a terminal. In so far as they are deducible from the input, these options are set automatically by LOGIN. O Half vs. full duplex. O Carriage return+line feed vs. newline. O Interpretation of tabs. O Parity. O Mapping of upper case to lower. O Raw vs. edited input. O Delays for tabs, newlines and carriage returns. _1._4. _F_i_l_e _M_a_n_i_p_u_l_a_t_i_o_n 99[] CAT Concatenate one or more files onto standard out- put. Particularly used for unadorned printing, for inserting data into a pipeline, and for buffering output that comes in dribs and drabs. Works on any file regardless of contents. 9[] CP Copy one file to another, or a set of files to a directory. Works on any file regardless of con- tents. 9[] PR Print files with title, date, and page number on every page. O Multicolumn output. O Parallel column merge of several files. 9[] LPR Off-line print. Spools arbitrary files to the line printer. 9[] CMP Compare two files and report if different. 9[] TAIL Print last _n lines of input O May print last _n characters, or from _n lines or characters to end. 9[] SPLIT Split a large file into more manageable pieces. Occasionally necessary for editing (ED). 9[] DD Physical file format translator, for exchanging August 27, 1987 PS2:2-6 UNIX 32/V - Summary data with foreign systems, especially IBM 370's. 9[] SUM Sum the words of a file. _1._5. _M_a_n_i_p_u_l_a_t_i_o_n _o_f _D_i_r_e_c_t_o_r_i_e_s _a_n_d _F_i_l_e _N_a_m_e_s 99[] RM Remove a file. Only the name goes away if any other names are linked to the file. O Step through a directory deleting files interac- tively. O Delete entire directory hierarchies. 9[] LN ``Link'' another name (alias) to an existing file. 9[] MV Move a file or files. Used for renaming files. 9[] CHMOD Change permissions on one or more files. Execut- able by files' owner. 9[] CHOWN Change owner of one or more files. 9[] CHGRP Change group (project) to which a file belongs. 9[] MKDIR Make a new directory. 9[] RMDIR Remove a directory. 9[] CD Change working directory. 9[] FIND Prowl the directory hierarchy finding every file that meets specified criteria. O Criteria include: name matches a given pattern, creation date in given range, date of last use in given range, given permissions, given owner, given special file characteristics, boolean combinations of above. O Any directory may be considered to be the root. O Perform specified command on each file found. _1._6. _R_u_n_n_i_n_g _o_f _P_r_o_g_r_a_m_s 99[] SH The Shell, or command language interpreter. O Supply arguments to and run any executable pro- gram. O Redirect standard input, standard output, and standard error files. O Pipes: simultaneous execution with output of one process connected to the input of another. O Compose compound commands using: if ... then ... else, case switches, while loops, for loops over lists, break, continue and exit, parentheses for grouping. O Initiate background processes. August 27, 1987 UNIX 32/V - Summary PS2:2-7 O Perform Shell programs, i.e., command scripts with substitutable arguments. O Construct argument lists from all file names satisfying specified patterns. O Take special action on traps and interrupts. O User-settable search path for finding commands. O Executes user-settable profile upon login. O Optionally announces presence of mail as it arrives. O Provides variables and parameters with default setting. 9[] TEST Tests for use in Shell conditionals. O String comparison. O File nature and accessibility. O Boolean combinations of the above. 9[] EXPR String computations for calculating command argu- ments. O Integer arithmetic O Pattern matching 9[] WAIT Wait for termination of asynchronously running processes. 9[] READ Read a line from terminal, for interactive Shell procedure. 9[] ECHO Print remainder of command line. Useful for diag- nostics or prompts in Shell programs, or for inserting data into a pipeline. 9[] SLEEP Suspend execution for a specified time. 9[] NOHUP Run a command immune to hanging up the terminal. 9[] NICE Run a command in low (or high) priority. 9[] KILL Terminate named processes. 9[] CRON Schedule regular actions at specified times. O Actions are arbitrary programs. O Times are conjunctions of month, day of month, day of week, hour and minute. Ranges are specifiable for each. 9[] AT Schedule a one-shot action for an arbitrary time. 9[] TEE Pass data between processes and divert a copy into one or more files. _1._7. _S_t_a_t_u_s _I_n_q_u_i_r_i_e_s 99[] LS List the names of one, several, or all files in one or more directories. O Alphabetic or temporal sorting, up or down. O Optional information: size, owner, group, date last modified, date last accessed, permissions, i-node number. 99 August 27, 1987 PS2:2-8 UNIX 32/V - Summary [] FILE Try to determine what kind of information is in a file by consulting the file system index and by reading the file itself. 9[] DATE Print today's date and time. Has considerable knowledge of calendric and horological peculiari- ties. O May set UNIX/32V's idea of date and time. 9[] DF Report amount of free space on file system dev- ices. 9[] DU Print a summary of total space occupied by all files in a hierarchy. 9[] QUOT Print summary of file space usage by user id. 9[] WHO Tell who's on the system. O List of presently logged in users, ports and times on. O Optional history of all logins and logouts. 9[] PS Report on active processes. O List your own or everybody's processes. O Tell what commands are being executed. O Optional status information: state and schedul- ing info, priority, attached terminal, what it's waiting for, size. 9[] IOSTAT Print statistics about system I/O activity. 9[] TTY Print name of your terminal. 9[] PWD Print name of your working directory. _1._8. _B_a_c_k_u_p _a_n_d _M_a_i_n_t_e_n_a_n_c_e 99[] MOUNT Attach a device containing a file system to the tree of directories. Protects against nonsense arrangements. 9[] UMOUNT Remove the file system contained on a device from the tree of directories. Protects against remov- ing a busy device. 9[] MKFS Make a new file system on a device. 9[] MKNOD Make an i-node (file system entry) for a special file. Special files are physical devices, virtual devices, physical memory, etc. 9[] TP 9[] TAR Manage file archives on magnetic tape or DECtape. TAR is newer. O Collect files into an archive. O Update DECtape archive by date. O Replace or delete DECtape files. O Print table of contents. O Retrieve from archive. 99 August 27, 1987 UNIX 32/V - Summary PS2:2-9 [] DUMP Dump the file system stored on a specified device, selectively by date, or indiscriminately. 9[] RESTOR Restore a dumped file system, or selectively retrieve parts thereof. 9[] SU Temporarily become the super user with all the rights and privileges thereof. Requires a pass- word. 9[] DCHECK 9[] ICHECK 9[] NCHECK Check consistency of file system. O Print gross statistics: number of files, number of directories, number of special files, space used, space free. O Report duplicate use of space. O Retrieve lost space. O Report inaccessible files. O Check consistency of directories. O List names of all files. 9[] CLRI Peremptorily expunge a file and its space from a file system. Used to repair damaged file systems. 9[] SYNC Force all outstanding I/O on the system to comple- tion. Used to shut down gracefully. _1._9. _A_c_c_o_u_n_t_i_n_g 9The timing information on which the reports are based can be manually cleared or shut off completely. 9[] AC Publish cumulative connect time report. O Connect time by user or by day. O For all users or for selected users. 9[] SA Publish Shell accounting report. Gives usage information on each command executed. O Number of times used. O Total system time, user time and elapsed time. O Optional averages and percentages. O Sorting on various fields. _1._1_0. _C_o_m_m_u_n_i_c_a_t_i_o_n 99[] MAIL Mail a message to one or more users. Also used to read and dispose of incoming mail. The presence of mail is announced by LOGIN and optionally by SH. O Each message can be disposed of individually. O Messages can be saved in files or forwarded. 9[] CALENDARAutomatic reminder service for events of today and tomorrow. 9[] WRITE Establish direct terminal communication with another user. August 27, 1987 PS2:2-10 UNIX 32/V - Summary [] WALL Write to all users. 9[] MESG Inhibit receipt of messages from WRITE and WALL. 9[] CU Call up another time-sharing system. O Transparent interface to remote machine. O File transmission. O Take remote input from local file or put remote output into local file. O Remote system need not be UNIX/32V. 9[] UUCP UNIX to UNIX copy. O Automatic queuing until line becomes available and remote machine is up. O Copy between two remote machines. O Differences, mail, etc., between two machines. _1._1_1. _B_a_s_i_c _P_r_o_g_r_a_m _D_e_v_e_l_o_p_m_e_n_t _T_o_o_l_s 9Some of these utilities are used as integral parts of the higher level languages described in section 2. 9[] AR Maintain archives and libraries. Combines several files into one for housekeeping efficiency. O Create new archive. O Update archive by date. O Replace or delete files. O Print table of contents. O Retrieve from archive. 9[] AS Assembler. O Creates object program consisting of code, normally read-only and sharable, initialized data or read-write code, uninitialized data. O Relocatable object code is directly executable without further transformation. O Object code normally includes a symbol table. O ``Conditional jump'' instructions become branches or branches plus jumps depending on distance. 9[] LibraryThe basic run-time library. These routines are used freely by all software. O Buffered character-by-character I/O. O Formatted input and output conversion (SCANF and PRINTF) for standard input and output, files, in-memory conversion. O Storage allocator. O Time conversions. O Number conversions. O Password encryption. O Quicksort. O Random number generator. O Mathematical function library, including tri- gonometric functions and inverses, exponential, logarithm, square root, bessel functions. 9 August 27, 1987 UNIX 32/V - Summary PS2:2-11 [] ADB Interactive debugger. O Postmortem dumping. O Examination of arbitrary files, with no limit on size. O Interactive breakpoint debugging with the debugger as a separate process. O Symbolic reference to local and global vari- ables. O Stack trace for C programs. O Output formats: 1-, 2-, or 4-byte integers in octal, decimal, or hex single and double floating point character and string disassembled machine instructions O Patching. O Searching for integer, character, or floating patterns. 9[] OD Dump any file. Output options include any combi- nation of octal or decimal or hex by words, octal by bytes, ASCII, opcodes, hexadecimal. O Range of dumping is controllable. 9[] LD Link edit. Combine relocatable object files. Insert required routines from specified libraries. O Resulting code is sharable by default. 9[] LORDER Places object file names in proper order for load- ing, so that files depending on others come after them. 9[] NM Print the namelist (symbol table) of an object program. Provides control over the style and order of names that are printed. 9[] SIZE Report the memory requirements of one or more object files. 9[] STRIP Remove the relocation and symbol table information from an object file to save space. 9[] TIME Run a command and report timing information on it. 9[] PROF Construct a profile of time spent per routine from statistics gathered by time-sampling the execution of a program. O Subroutine call frequency and average times for C programs. 9[] MAKE Controls creation of large programs. Uses a con- trol file specifying source file dependencies to make new version; uses time last changed to deduce minimum amount of work necessary. O Knows about CC, YACC, LEX, etc. _1._1_2. _U_N_I_X/_3_2_V _P_r_o_g_r_a_m_m_e_r'_s _M_a_n_u_a_l 99[] Manual Machine-readable version of the UNIX/32V Programmer's Manual. 9 August 27, 1987 PS2:2-12 UNIX 32/V - Summary O System overview. O All commands. O All system calls. O All subroutines in C and assembler libraries. O All devices and other special files. O Formats of file system and kinds of files known to system software. O Boot and maintenance procedures. 9[] MAN Print specified manual section on your terminal. _1._1_3. _C_o_m_p_u_t_e_r-_A_i_d_e_d _I_n_s_t_r_u_c_t_i_o_n 99[] LEARN A program for interpreting CAI scripts, plus scripts for learning about UNIX/32V by using it. O Scripts for basic files and commands, editor, advanced files and commands, EQN, MS macros, C programming language. _2. _L_a_n_g_u_a_g_e_s _2._1. _T_h_e _C _L_a_n_g_u_a_g_e 99[] CC Compile and/or link edit programs in the C language. The UNIX/32V operating system, most of the subsystems and C itself are written in C. For a full description of C, read _T_h_e _C _P_r_o_g_r_a_m_m_i_n_g _L_a_n_g_u_a_g_e, Brian W. Kernighan and Dennis M. Ritchie, Prentice-Hall, 1978. O General purpose language designed for structured programming. O Data types include character, integer, float, double, pointers to all types, functions return- ing above types, arrays of all types, structures and unions of all types. O Operations intended to give machine-independent control of full machine facility, including to- memory operations and pointer arithmetic. O Macro preprocessor for parameterized code and inclusion of standard files. O All procedures recursive, with parameters by value. O Machine-independent pointer manipulation. O Object code uses full addressing capability of the VAX-11. O Runtime library gives access to all system facilities. O Definable data types. O Block structure 9[] LINT Verifier for C programs. Reports questionable or nonportable usage such as: Mismatched data declarations and procedure interfaces. Nonportable type conversions. Unused variables, unreachable code, no-effect operations. August 27, 1987 UNIX 32/V - Summary PS2:2-13 Mistyped pointers. Obsolete syntax. O Full cross-module checking of separately com- piled programs. 9[] CB A beautifier for C programs. Does proper indenta- tion and placement of braces. _2._2. _F_o_r_t_r_a_n 99[] F77 A full compiler for ANSI Standard Fortran 77. O Compatible with C and supporting tools at object level. O Optional source compatibility with Fortran 66. O Free format source. O Optional subscript-range checking, detection of uninitialized variables. O All widths of arithmetic: 2- and 4-byte integer; 4- and 8-byte real; 8- and 16-byte complex. 9[] RATFOR Ratfor adds rational control structure a` la C to Fortran. O Compound statements. O If-else, do, for, while, repeat-until, break, next statements. O Symbolic constants. O File insertion. O Free format source O Translation of relationals like >, >=. O Produces genuine Fortran to carry away. O May be used with F77. 9[] STRUCT Converts ordinary ugly Fortran into structured Fortran (i.e., Ratfor), using statement grouping, if-else, while, for, repeat-until. _2._3. _O_t_h_e_r _A_l_g_o_r_i_t_h_m_i_c _L_a_n_g_u_a_g_e_s 9[] DC Interactive programmable desk calculator. Has named storage locations as well as conventional stack for holding integers or programs. O Unlimited precision decimal arithmetic. O Appropriate treatment of decimal fractions. O Arbitrary input and output radices, in particu- lar binary, octal, decimal and hexadecimal. O Reverse Polish operators: + - * / remainder, power, square root, load, store, duplicate, clear, print, enter program text, execute. 9[] BC A C-like interactive interface to the desk calcu- lator DC. O All the capabilities of DC with a high-level syntax. O Arrays and recursive functions. 9 August 27, 1987 PS2:2-14 UNIX 32/V - Summary O Immediate evaluation of expressions and evalua- tion of functions upon call. O Arbitrary precision elementary functions: exp, sin, cos, atan. O Go-to-less programming. _2._4. _M_a_c_r_o_p_r_o_c_e_s_s_i_n_g 99[] M4 A general purpose macroprocessor. O Stream-oriented, recognizes macros anywhere in text. O Syntax fits with functional syntax of most higher-level languages. O Can evaluate integer arithmetic expressions. _2._5. _C_o_m_p_i_l_e_r-_c_o_m_p_i_l_e_r_s 99[] YACC An LR(1)-based compiler writing system. During execution of resulting parsers, arbitrary C func- tions may be called to do code generation or semantic actions. O BNF syntax specifications. O Precedence relations. O Accepts formally ambiguous grammars with non-BNF resolution rules. 9[] LEX Generator of lexical analyzers. Arbitrary C func- tions may be called upon isolation of each lexical token. O Full regular expression, plus left and right context dependence. O Resulting lexical analysers interface cleanly with YACC parsers. _3. _T_e_x_t _P_r_o_c_e_s_s_i_n_g _3._1. _D_o_c_u_m_e_n_t _P_r_e_p_a_r_a_t_i_o_n 99[] ED Interactive context editor. Random access to all lines of a file. O Find lines by number or pattern. Patterns may include: specified characters, don't care char- acters, choices among characters, repetitions of these constructs, beginning of line, end of line. O Add, delete, change, copy, move or join lines. O Permute or split contents of a line. O Replace one or all instances of a pattern within a line. O Combine or split files. O Escape to Shell (command language) during edit- ing. O Do any of above operations on every pattern- selected line in a given range. 9 August 27, 1987 UNIX 32/V - Summary PS2:2-15 O Optional encryption for extra security. 9[] PTX Make a permuted (key word in context) index. 9[] SPELL Look for spelling errors by comparing each word in a document against a word list. O 25,000-word list includes proper names. O Handles common prefixes and suffixes. O Collects words to help tailor local spelling lists. 9[] LOOK Search for words in dictionary that begin with specified prefix. 9[] CRYPT Encrypt and decrypt files for security. _3._2. _D_o_c_u_m_e_n_t _F_o_r_m_a_t_t_i_n_g 99[] TROFF 9[] NROFF Advanced typesetting. TROFF drives a Graphic Sys- tems phototypesetter; NROFF drives ascii terminals of all types. This summary was typeset using TROFF. TROFF and NROFF are capable of elaborate feats of formatting, when appropriately pro- grammed. TROFF and NROFF accept the same input language. O Completely definable page format keyed to dynam- ically planted ``interrupts'' at specified lines. O Maintains several separately definable typeset- ting environments (e.g., one for body text, one for footnotes, and one for unusually elaborate headings). O Arbitrary number of output pools can be combined at will. O Macros with substitutable arguments, and macros invocable in mid-line. O Computation and printing of numerical quanti- ties. O Conditional execution of macros. O Tabular layout facility. O Positions expressible in inches, centimeters, ems, points, machine units or arithmetic combi- nations thereof. O Access to character-width computation for unusu- ally difficult layout problems. O Overstrikes, built-up brackets, horizontal and vertical line drawing. O Dynamic relative or absolute positioning and size selection, globally or at the character level. O Can exploit the characteristics of the terminal being used, for approximating special charac- ters, reverse motions, proportional spacing, etc. 9 August 27, 1987 PS2:2-16 UNIX 32/V - Summary The Graphic Systems typesetter has a vocabulary of several 102-character fonts (4 simultaneously) in 15 sizes. TROFF provides terminal output for rough sampling of the product. 9NROFF will produce multicolumn output on terminals capable of reverse line feed, or through the postprocessor COL. 9High programming skill is required to exploit the formatting capabilities of TROFF and NROFF, although unskilled person- nel can easily be trained to enter documents according to canned formats such as those provided by MS, below. TROFF and EQN are essentially identical to NROFF and NEQN so it is usually possible to define interchangeable formats to pro- duce approximate proof copy on terminals before actual typesetting. The preprocessors MS, TBL, and REFER are fully compatible with TROFF and NROFF. 9[] MS A standardized manuscript layout package for use with NROFF/TROFF. This document was formatted with MS. O Page numbers and draft dates. O Automatically numbered subheads. O Footnotes. O Single or double column. O Paragraphing, display and indentation. O Numbered equations. 9[] EQN A mathematical typesetting preprocessor for TROFF. Translates easily readable formulas, either in- line or displayed, into detailed typesetting instructions. Formulas are written in a style like this: sigma sup 2 ~=~ 1 over N sum from i=1 to N ( x sub i - x bar ) sup 2 which produces: 9 _Y829 _=99 _N7719__9999_i_=178_R78_N999 (_x9_i8_-_x)82 9 O Automatic calculation of size changes for sub- scripts, sub-subscripts, etc. O Full vocabulary of Greek letters and special symbols, such as `gamma', `GAMMA', `integral'. O Automatic calculation of large bracket sizes. O Vertical ``piling'' of formulae for matrices, conditional alternatives, etc. O Integrals, sums, etc., with arbitrarily complex limits. O Diacriticals: dots, double dots, hats, bars, etc. O Easily learned by nonprogrammers and mathemati- cal typists. 9[] NEQN A version of EQN for NROFF; accepts the same input language. Prepares formulas for display on any terminal that NROFF knows about, for example, August 27, 1987 UNIX 32/V - Summary PS2:2-17 those based on Diablo printing mechanism. O Same facilities as EQN within graphical capabil- ity of terminal. 9[] TBL A preprocessor for NROFF/TROFF that translates simple descriptions of table layouts and contents into detailed typesetting instructions. O Computes column widths. O Handles left- and right-justified columns, cen- tered columns and decimal-point alignment. O Places column titles. O Table entries can be text, which is adjusted to fit. O Can box all or parts of table. 9[] REFER Fills in bibliographic citations in a document from a data base (not supplied). O References may be printed in any style, as they occur or collected at the end. O May be numbered sequentially, by name of author, etc. 9[] TC Simulate Graphic Systems typesetter on Tektronix 4014 scope. Useful for checking TROFF page layout before typesetting. 9[] COL Canonicalize files with reverse line feeds for one-pass printing. 9[] DEROFF Remove all TROFF commands from input. 9[] CHECKEQCheck document for possible errors in EQN usage. _4. _I_n_f_o_r_m_a_t_i_o_n _H_a_n_d_l_i_n_g 99[] SORT Sort or merge ASCII files line-by-line. No limit on input size. O Sort up or down. O Sort lexicographically or on numeric key. O Multiple keys located by delimiters or by char- acter position. O May sort upper case together with lower into dictionary order. O Optionally suppress duplicate data. 9[] TSORT Topological sort - converts a partial order into a total order. 9[] UNIQ Collapse successive duplicate lines in a file into one line. O Publish lines that were originally unique, duplicated, or both. O May give redundancy count for each line. 9[] TR Do one-to-one character translation according to an arbitrary code. O May coalesce selected repeated characters. O May delete selected characters. 9 August 27, 1987 PS2:2-18 UNIX 32/V - Summary [] DIFF Report line changes, additions and deletions necessary to bring two files into agreement. O May produce an editor script to convert one file into another. O A variant compares two new versions against one old one. 9[] COMM Identify common lines in two sorted files. Output in up to 3 columns shows lines present in first file only, present in both, and/or present in second only. 9[] JOIN Combine two files by joining records that have identical keys. 9[] GREP Print all lines in a file that satisfy a pattern as used in the editor ED. O May print all lines that fail to match. O May print count of hits. O May print first hit in each file. 9[] LOOK Binary search in sorted file for lines with speci- fied prefix. 9[] WC Count the lines, ``words'' (blank-separated strings) and characters in a file. 9[] SED Stream-oriented version of ED. Can perform a sequence of editing operations on each line of an input stream of unbounded length. O Lines may be selected by address or range of addresses. O Control flow and conditional testing. O Multiple output streams. O Multi-line capability. 9[] AWK Pattern scanning and processing language. Searches input for patterns, and performs actions on each line of input that satisfies the pattern. O Patterns include regular expressions, arithmetic and lexicographic conditions, boolean combina- tions and ranges of these. O Data treated as string or numeric as appropri- ate. O Can break input into fields; fields are vari- ables. O Variables and arrays (with non-numeric sub- scripts). O Full set of arithmetic operators and control flow. O Multiple output streams to files and pipes. O Output can be formatted as desired. O Multi-line capabilities. _5. _G_r_a_p_h_i_c_s 9The programs in this section are predominantly intended for use with Tektronix 4014 storage scopes. August 27, 1987 UNIX 32/V - Summary PS2:2-19 [] GRAPH Prepares a graph of a set of input numbers. O Input scaled to fit standard plotting area. O Abscissae may be supplied automatically. O Graph may be labeled. O Control over grid style, line style, graph orientation, etc. 9[] SPLINE Provides a smooth curve through a set of points intended for GRAPH. 9[] PLOT A set of filters for printing graphs produced by GRAPH and other programs on various terminals. Filters provided for 4014, DASI terminals, Versa- tec printer/plotter. _6. _N_o_v_e_l_t_i_e_s, _G_a_m_e_s, _a_n_d _T_h_i_n_g_s _T_h_a_t _D_i_d_n'_t _F_i_t _A_n_y_w_h_e_r_e _E_l_s_e 99[] BACKGAMMON A player of modest accomplishment. 9[] BCD Converts ascii to card-image form. 9[] CAL Print a calendar of specified month and year. 9[] CHING The _I _C_h_i_n_g. Place your own interpretation on the output. 9[] FORTUNEPresents a random fortune cookie on each invoca- tion. Limited jar of cookies included. 9[] UNITS Convert amounts between different scales of meas- urement. Knows hundreds of units. For example, how many km/sec is a parsec/megayear? 9[] ARITHMETIC Speed and accuracy test for number facts. 9[] QUIZ Test your knowledge of Shakespeare, Presidents, capitals, etc. 9[] WUMP Hunt the wumpus, thrilling search in a dangerous cave. 9[] HANGMANWord-guessing game. Uses a dictionary supplied with SPELL. 9[] FISH Children's card-guessing game. August 27, 1987