# To unbundle, run this file echo hel.mac sed 's/.//' >hel.mac <<'//GO.SYSIN DD hel.mac' -.hy 9 -.de op -.nr PD 0 -.IP \h'1i'\(ci 1i+2 -.nr PD .5v -.. -.de sh -.IP "\(sq\ \\$1" 1i -.. -.de OP -.op \\$1 \\$2 \\$3 -.. -.de UC -\&\\$3\\s-1\\$1\\s0\\$2\& -.. //GO.SYSIN DD hel.mac echo hel0 sed 's/.//' >hel0 <<'//GO.SYSIN DD hel0' -.TL -7th Edition UNIX \(em Summary -.AU -September 6, 1978 -.AI -.MH -.SH -A. What's new: highlights of the 7th edition UNIX\(dg System -.FS -\(dg -.UC UNIX -is a Trademark of Bell Laboratories. -.FE -.LP -.B "Aimed at larger systems." -Devices are addressable to 2\u\s-231\s+2\d -bytes, files to 2\u\s-230\s+2\d bytes. -128K memory (separate instruction and data space) is needed for some utilities. -.LP -.B "Portability." -Code of the operating system and most utilities has -been extensively revised to minimize its -dependence on particular hardware. -.LP -.B "Fortran 77." -F77 compiler for the new standard language -is compatible with C at the object level. -A Fortran structurer, STRUCT, converts old, ugly Fortran into RATFOR, -a structured dialect usable with F77. -.LP -.B "Shell." -Completely new SH program supports string variables, -trap handling, structured programming, user profiles, -settable search path, -multilevel file name generation, etc. -.LP -.B "Document preparation." -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. -.LP -.B "UNIX-to-UNIX file copy." -UUCP performs spooled -file transfers between any two machines. -.LP -.B "Data processing." -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. -.LP -.B "Program development." -MAKE -controls re-creation of complicated software, -arranging for minimal recompilation. -.LP -.B "Debugging." -ADB does postmortem and breakpoint debugging, -handles separate instruction and data spaces, -floating point, etc. -.LP -.B "C language." -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 functions. -.LP -.B "Lexical analyzer generator." -LEX converts specification of regular expressions -and semantic actions into a recognizing subroutine. -Analogous to YACC. -.LP -.B "Graphics." -Simple graph-drawing utility, graphic subroutines, and -generalized plotting filters adapted to various devices -are now standard. -.LP -.B "Standard input-output package." -Highly efficient buffered stream I/O is -integrated with formatted input and output. -.LP -.B "Other." -The operating system and utilities have been enhanced -and freed of restrictions in many -other ways too numerous to relate. -.sp 100 //GO.SYSIN DD hel0 echo hel1 sed 's/.//' >hel1 <<'//GO.SYSIN DD hel1' -.SH -B. Hardware -.PP -The -7th edition -.UC UNIX -operating system -runs on -a DEC PDP-11/45 or 11/70* -.FS -*PDP is a Trademark of Digital Equipment Corporation. -.FE -with at least the following equipment: -.IP -128K to 2M words of managed memory; parity not used. -.IP -disk: RP03, RP04, RP06, RK05 (more than 1 RK05) or equivalent. -.IP -console typewriter. -.IP -clock: KW11-L or KW11-P. -.LP -The following equipment is strongly recommended: -.IP -communications controller such as DL11 or DH11. -.IP -full duplex 96-character ASCII terminals. -.IP -9-track tape or extra disk for system backup. -.LP -The system is normally distributed on 9-track tape. -The minimum memory and disk space specified is enough to run -and maintain -.UC UNIX . -More will be needed to keep all source on line, or to handle -a large number of users, -big data bases, diversified complements of devices, or large -programs. -The resident code -occupies 12-20K words depending -on configuration; -system data occupies 10-28K words. -.PP -There is no commitment to provide 7th edition -.UC UNIX -on PDP-11/34, 11/40 and 11/60 hardware. -.SH -C. Software -.PP -Most of the programs available as -.UC UNIX -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 editor) -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. -.NH -Basic Software -.PP -This -includes the time-sharing operating -system with utilities, a machine language assembler and a -compiler for the programming language C\(emenough -software to -write and run new applications -and to maintain or modify -.UC UNIX -itself. -.NH 2 -Operating System -.sh UNIX -The basic resident code -on which everything else depends. -Supports the system calls, and maintains the file system. -A general description of -.UC UNIX -design -philosophy and system facilities appeared in -the Communications of the ACM, July, 1974. -A more extensive survey is in the Bell System Technical Journal -for July-August 1978. -Capabilities include: -.op -Reentrant code for user processes. -.op -Separate instruction and data spaces. -.op -``Group'' access permissions for cooperative projects, -with overlapping memberships. -.op -Alarm-clock timeouts. -.op -Timer-interrupt sampling and interprocess monitoring -for debugging and measurement. -.OP -Multiplexed I/O for machine-to-machine communication. -.sh DEVICES -All 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 overlapped I/O. -Unbuffered physical record -I/O is available for unusual applications. -Drivers for these devices are -available; others can be easily written: -.op -Asynchronous interfaces: DH11, DL11. -Support for most common ASCII terminals. -.op -Synchronous interface: DP11. -.op -Automatic calling unit interface: DN11. -.op -Line printer: LP11. -.op -Magnetic tape: TU10 and TU16. -.op -DECtape: TC11. -.op -Fixed head disk: RS11, RS03 and RS04. -.op -Pack type disk: RP03, RP04, RP06; -minimum-latency seek scheduling. -.op -Cartridge-type disk: RK05, one or more physical devices per -logical device. -.op -Null device. -.op -Physical memory of PDP-11, or mapped memory in resident system. -.op -Phototypesetter: Graphic Systems System/1 through DR11C. -.sh BOOT -Procedures to get -.UC UNIX -started. -.sh MKCONF -Tailor device-dependent system code to hardware configuration. -As distributed, -.UC UNIX -can -be brought up directly on any acceptable CPU -with any acceptable disk, any sufficient amount of core, -and either clock. -Other changes, such as optimal -assignment of directories to devices, inclusion of floating -point simulator, or installation of device names in file system, -can then be made at leisure. -.NH 2 -User Access Control -.LP -.sh LOGIN -Sign on as a new user. -.op -Verify password and establish user's -individual and group (project) identity. -.op -Adapt to characteristics of terminal. -.op -Establish working directory. -.op -Announce presence of mail (from MAIL). -.op -Publish message of the day. -.op -Execute user-specified profile. -.op -Start command interpreter or other initial program. -.sh PASSWD -Change a password. -.op -User can change his own password. -.op -Passwords are kept encrypted for security. -.sh NEWGRP -Change working group (project). -Protects against unauthorized changes to projects. -.NH 2 -Terminal Handling -.LP -.sh TABS -Set tab stops appropriately for specified terminal type. -.sh 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. -.op -Half vs. full duplex. -.op -Carriage return+line feed vs. newline. -.op -Interpretation of tabs. -.op -Parity. -.op -Mapping of upper case to lower. -.op -Raw vs. edited input. -.op -Delays for tabs, newlines and carriage returns. -.NH 2 -File Manipulation -.LP -.sh CAT -Concatenate one or more files onto standard output. -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. -.sh CP -Copy one file to another, -or a set of files to a directory. -Works on any file regardless of contents. -.sh PR -Print files with title, date, and page number on every page. -.op -Multicolumn output. -.op -Parallel column merge of several files. -.sh LPR -Off-line print. -Spools arbitrary files to the line printer. -.sh CMP -Compare two files and report if different. -.sh TAIL -Print last -.I n -lines of input -.op -May print last -.I n -characters, or from -.I n -lines or characters to end. -.sh SPLIT -Split a large file into more manageable pieces. -Occasionally necessary for editing (ED). -.sh DD -Physical file format translator, -for exchanging data with foreign -systems, especially IBM 370's. -.sh SUM -Sum the words of a file. -.NH 2 -Manipulation of Directories and File Names -.LP -.sh RM -Remove a file. -Only the name goes away if any other names are linked to the file. -.OP -Step through a directory deleting files interactively. -.OP -Delete entire directory hierarchies. -.sh LN -``Link'' another name (alias) to an existing file. -.sh MV -Move a file or files. -Used for renaming files. -.sh CHMOD -Change permissions on one or more files. -Executable by files' owner. -.sh CHOWN -Change owner of one or more files. -.sh CHGRP -Change group (project) to which a file belongs. -.sh MKDIR -Make a new directory. -.sh RMDIR -Remove a directory. -.sh CD -Change working directory. -.sh FIND -Prowl the directory -hierarchy finding -every file that meets -specified criteria. -.op -Criteria include: -.in +2 -.nf -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. -.in -2 -.fi -.op -Any directory may be considered to be the root. -.op -Perform specified command on each file found. -.NH 2 -Running of Programs -.LP -.sh SH -The Shell, or command language interpreter. -.op -Supply arguments to and run any executable program. -.op -Redirect standard input, standard output, and standard error files. -.op -Pipes: -simultaneous execution with output of one process connected -to the input of another. -.OP -Compose compound commands using: -.in+2 -if ... then ... else, -.br -case switches, -.br -while loops, -.br -for loops over lists, -.br -break, continue and exit, -.br -parentheses for grouping. -.in -2 -.op -Initiate background processes. -.op -Perform Shell programs, i.e., command scripts with -substitutable arguments. -.op -Construct argument lists from all file names -satisfying specified patterns. -.OP -Take special action on traps and interrupts. -.OP -User-settable search path for finding commands. -.OP -Executes user-settable profile upon login. -.OP -Optionally announces presence of mail as it arrives. -.op -Provides variables and parameters with default setting. -.sh TEST -Tests for use in Shell conditionals. -.op -String comparison. -.op -File nature and accessibility. -.op -Boolean combinations of the above. -.sh EXPR -String computations for calculating command arguments. -.OP -Integer arithmetic -.OP -Pattern matching -.sh WAIT -Wait for termination of asynchronously running processes. -.sh READ -Read a line from terminal, -for interactive Shell procedure. -.sh ECHO -Print remainder of command line. -Useful for diagnostics or prompts in Shell programs, -or for inserting data into a pipeline. -.sh SLEEP -Suspend execution for a specified time. -.sh NOHUP -Run a command immune to hanging up the terminal. -.sh NICE -Run a command in low (or high) priority. -.sh KILL -Terminate named processes. -.sh CRON -Schedule regular actions at specified times. -.op -Actions are arbitrary programs. -.op -Times are -conjunctions of month, day of month, day of week, hour -and minute. -Ranges are specifiable for each. -.sh AT -Schedule a one-shot action for an arbitrary time. -.sh TEE -Pass data between processes and divert a copy into one or more files. -.NH 2 -Status Inquiries -.LP -.sh LS -List the names of one, several, or all files in one or more directories. -.op -Alphabetic or temporal sorting, up or down. -.op -Optional information: -size, -owner, -group, -date last modified, -date last accessed, -permissions, -i-node number. -.sh FILE -Try to determine -what kind of information is in a file by consulting -the file system index and by reading the file itself. -.sh DATE -Print today's date and time. -Has considerable knowledge -of calendric and horological peculiarities. -.op -May set -.UC UNIX 's -idea of date and time. -.sh DF -Report amount of free space on file system devices. -.sh DU -Print a summary of total space occupied by all files in a hierarchy. -.sh QUOT -Print summary of file space usage by user id. -.sh WHO -Tell who's on the system. -.op -List of presently logged in users, -ports and times on. -.op -Optional history of all logins and logouts. -.sh PS -Report on active processes. -.op -List your own or everybody's processes. -.op -Tell what commands are being executed. -.op -Optional status information: -state and scheduling info, -priority, -attached terminal, -what it's waiting for, -size. -.sh IOSTAT -Print statistics about system I/O activity. -.sh TTY -Print name of your terminal. -.sh PWD -Print name of your working directory. -.NH 2 -Backup and Maintenance -.LP -.sh MOUNT -Attach a device containing -a file system to -the tree of directories. -Protects against nonsense arrangements. -.sh UMOUNT -Remove the file system contained on a device -from the tree of directories. -Protects against removing a busy device. -.sh MKFS -Make a new file system on a device. -.sh MKNOD -Make an i-node (file system entry) for a special file. -Special files are -physical devices, -virtual devices, physical memory, etc. -.sh TP -.sh TAR -Manage file archives on magnetic tape or DECtape. -TAR is newer. -.op -Collect files into an archive. -.op -Update DECtape archive by date. -.op -Replace or delete DECtape files. -.op -Print table of contents. -.op -Retrieve from archive. -.sh DUMP -Dump the file system -stored on a specified device, selectively by date, or indiscriminately. -.sh RESTOR -Restore a dumped file system, -or selectively retrieve parts thereof. -.sh SU -Temporarily become the super user with all the rights and privileges -thereof. -Requires a password. -.sh DCHECK -.sh ICHECK -.sh NCHECK -Check consistency of file system. -.op -Print gross statistics: -number of files, -number of directories, -number of special files, -space used, -space free. -.op -Report duplicate use of space. -.op -Retrieve lost space. -.op -Report inaccessible files. -.op -Check consistency of directories. -.op -List names of all files. -.sh CLRI -Peremptorily expunge a file and its space from a file system. -Used to repair damaged file systems. -.sh SYNC -Force all outstanding I/O on the system to completion. -Used to shut down gracefully. -.NH 2 -Accounting -.LP -The timing information on which the reports are based can be -manually cleared or shut off completely. -.sh AC -Publish cumulative connect time report. -.op -Connect time by user or by day. -.op -For all users or for selected users. -.sh SA -Publish Shell accounting -report. -Gives usage information on each command executed. -.op -Number of times used. -.op -Total system time, user time and elapsed time. -.op -Optional averages and percentages. -.op -Sorting on various fields. -.NH 2 -Communication -.LP -.sh 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. -.op -Each message can be disposed of individually. -.op -Messages can be saved in files or forwarded. -.sh CALENDAR -Automatic reminder service for events of today and tomorrow. -.sh WRITE -Establish direct terminal communication with another user. -.sh WALL -Write to all users. -.sh MESG -Inhibit receipt of messages from WRITE and WALL. -.sh CU -Call up another time-sharing system. -.OP -Transparent interface to remote machine. -.OP -File transmission. -.OP -Take remote input from local file or put remote output -into local file. -.OP -Remote system need not be -.UC UNIX . -.sh UUCP -.UC UNIX -to -.UC UNIX -copy. -.OP -Automatic queuing until line becomes available -and remote machine is up. -.OP -Copy between two remote machines. -.op -Differences, mail, etc., between two machines. -.NH 2 -Basic Program Development Tools -.LP -Some of these utilities are used as integral parts of -the higher level languages described in section 2. -.sh AR -Maintain archives and libraries. -Combines several files into one for housekeeping efficiency. -.op -Create new archive. -.op -Update archive by date. -.op -Replace or delete files. -.op -Print table of contents. -.op -Retrieve from archive. -.sh AS -Assembler. -Similar to PAL-11, but different in detail. -.op -Creates object program consisting of -.in+2 -.nf -code, possibly read-only, -initialized data or read-write code, -uninitialized data. -.in -2 -.fi -.op -Relocatable object code is directly executable without -further transformation. -.op -Object code normally includes a symbol table. -.op -Multiple source files. -.op -Local labels. -.op -Conditional assembly. -.op -``Conditional jump'' instructions become -branches or branches plus jumps depending on distance. -.sh Library -The basic run-time library. -These routines are used freely by all software. -.op -Buffered character-by-character I/O. -.op -Formatted input and output conversion (SCANF and PRINTF) -for standard input and output, files, in-memory conversion. -.op -Storage allocator. -.op -Time conversions. -.op -Number conversions. -.op -Password encryption. -.op -Quicksort. -.op -Random number generator. -.op -Mathematical function library, including -trigonometric functions and inverses, -exponential, logarithm, square root, -bessel functions. -.sh ADB -Interactive debugger. -.op -Postmortem dumping. -.OP -Examination of arbitrary files, with no limit on size. -.op -Interactive breakpoint debugging with the debugger as a separate -process. -.OP -Symbolic reference to local and global variables. -.op -Stack trace for C programs. -.OP -Output formats: -.in+2 -.nf -1-, 2-, or 4-byte integers in octal, decimal, or hex -.br -single and double floating point -.br -character and string -.br -disassembled machine instructions -.br -.fi -.in-2 -.op -Patching. -.OP -Searching for integer, character, or floating patterns. -.OP -Handles separated instruction and data space. -.sh OD -Dump any file. -Output options include any combination of -octal or decimal by words, -octal by bytes, -ASCII, -opcodes, -hexadecimal. -.op -Range of dumping is controllable. -.sh LD -Link edit. -Combine relocatable object files. -Insert required routines from specified libraries. -.op -Resulting code may be sharable. -.op -Resulting code may have separate instruction and data spaces. -.sh LORDER -Places object file names in proper order for loading, -so that files depending on others come after them. -.sh NM -Print the namelist (symbol table) of an object program. -Provides control over the style and order of -names that are printed. -.sh SIZE -Report the core requirements -of one or more object files. -.sh STRIP -Remove the relocation and symbol table information from -an object file to save space. -.sh TIME -Run a command and report timing information on it. -.sh PROF -Construct a profile of time spent per routine -from statistics gathered by time-sampling the -execution of a program. -Uses floating point. -.op -Subroutine call frequency and average times for C programs. -.sh MAKE -Controls creation of large programs. -Uses a control file specifying source file dependencies -to make new version; -uses time last changed to deduce minimum amount of work necessary. -.op -Knows about CC, YACC, LEX, etc. -.NH 2 -UNIX Programmer's Manual -.LP -.sh Manual -Machine-readable version of the -.UC UNIX -Programmer's Manual. -.op -System overview. -.op -All commands. -.op -All system calls. -.op -All subroutines in C and assembler libraries. -.op -All devices and other special files. -.op -Formats of file system and kinds -of files known to system software. -.op -Boot and maintenance procedures. -.sh MAN -Print specified manual section on your terminal. -.NH 2 -Computer-Aided Instruction -.LP -.sh LEARN -A program for interpreting CAI scripts, plus scripts -for learning about -.UC UNIX -by using it. -.op -Scripts for basic files and commands, -editor, -advanced files and commands, -.UC EQN , -.UC MS -macros, -C programming language. //GO.SYSIN DD hel1 echo hel2 sed 's/.//' >hel2 <<'//GO.SYSIN DD hel2' -.NH -Languages -.NH 2 -The C Language -.LP -.sh CC -Compile and/or link edit programs in the C -language. -The -.UC UNIX -operating system, most of the -subsystems and C itself are written in C. -For a full description of C, read -.ul -The C Programming Language, -Brian W. Kernighan and Dennis M. Ritchie, -Prentice-Hall, 1978. -.op -General purpose language -designed for structured programming. -.op -Data types include -character, -integer, -float, -double, -pointers to all types, -functions returning above types, -arrays of all types, -structures and unions of all types. -.op -Operations intended to give machine-independent control -of full machine facility, including to-memory -operations and -pointer arithmetic. -.op -Macro preprocessor for parameterized code and inclusion of -standard files. -.op -All procedures recursive, with parameters by value. -.op -Machine-independent pointer manipulation. -.op -Object code uses full -addressing capability of the PDP-11. -.op -Runtime library gives access to all system facilities. -.OP -Definable data types. -.OP -Block structure -.sh LINT -Verifier for C programs. -Reports questionable or nonportable usage such as: -.nf -.in +2 -Mismatched data declarations and procedure interfaces. -.br -Nonportable type conversions. -.br -Unused variables, unreachable code, no-effect operations. -.br -Mistyped pointers. -.br -Obsolete syntax. -.in -2 -.OP -Full cross-module checking of separately compiled programs. -.sh CB -A beautifier for C programs. -Does proper indentation and placement of braces. -.NH 2 -Fortran -.LP -.sh F77 -A full compiler for -ANSI Standard Fortran 77. -.OP -Compatible with C and supporting tools at object level. -.OP -Optional source compatibility with Fortran 66. -.OP -Free format source. -.op -Optional subscript-range checking, detection of uninitialized variables. -.OP -All widths of arithmetic: -2- and 4-byte integer; 4- and 8-byte real; 8- and 16-byte -complex. -.sh RATFOR -Ratfor adds rational -control structure \o'a\(ga' la C to Fortran. -.op -Compound statements. -.op -If-else, do, for, while, -repeat-until, break, next -statements. -.op -Symbolic constants. -.op -File insertion. -.op -Free format source -.op -Translation of relationals like >, >=. -.op -Produces genuine Fortran to carry away. -.op -May be used with F77. -.sh STRUCT -Converts ordinary ugly Fortran into structured Fortran (i.e., Ratfor), -using statement grouping, if-else, while, for, repeat-until. -.NH 2 -Other Algorithmic Languages -.LP -.sh BAS -An interactive interpreter, similar in style to BASIC. -Interpret unnumbered statements immediately, -numbered statements upon `run'. -.op -Statements include: -.in+2 -.nf -comment, -dump, -for...next, -goto, -if...else...fi, -list, -print, -prompt, -return, -run, -save. -.fi -.in 0 -.op -All calculations double precision. -.op -Recursive function defining and calling. -.op -Builtin functions include log, exp, sin, cos, atn, int, -sqr, abs, rnd. -.op -Escape to ED for complex program editing. -.sh DC -Interactive programmable desk calculator. -Has named storage locations as well -as conventional stack for holding integers or programs. -.op -Unlimited precision decimal arithmetic. -.op -Appropriate treatment of decimal fractions. -.op -Arbitrary input and output radices, in particular -binary, octal, decimal and hexadecimal. -.op -Reverse Polish operators: -.in+2 -.nf -+ \- * / -remainder, power, square root, -load, store, duplicate, clear, -print, enter program text, execute. -.in-2 -.fi -.sh BC -A C-like interactive interface to the desk calculator DC. -.op -All the capabilities of DC with a high-level syntax. -.op -Arrays and recursive functions. -.op -Immediate evaluation of expressions and evaluation of -functions upon call. -.op -Arbitrary precision elementary functions: -exp, sin, cos, atan. -.op -Go-to-less programming. -.NH 2 -Macroprocessing -.LP -.nr c 0 1 -.sh M4 -A general purpose macroprocessor. -.OP -Stream-oriented, recognizes macros anywhere in text. -.OP -Syntax fits with functional syntax of most higher-level -languages. -.OP -Can evaluate integer arithmetic expressions. -.NH 2 -Compiler-compilers -.LP -.sh YACC -An LR(1)-based compiler writing system. -During execution of resulting -parsers, arbitrary C functions may be -called to do code generation or semantic actions. -.op -BNF syntax specifications. -.op -Precedence relations. -.op -Accepts formally ambiguous grammars -with non-BNF resolution rules. -.sh LEX -Generator of lexical analyzers. -Arbitrary C functions may be called -upon isolation of each lexical token. -.OP -Full regular expression, -plus left and right context dependence. -.OP -Resulting lexical analysers interface cleanly -with YACC parsers. //GO.SYSIN DD hel2 echo hel3 sed 's/.//' >hel3 <<'//GO.SYSIN DD hel3' -.NH -Text Processing -.NH 2 -Document Preparation -.LP -.sh ED -Interactive context editor. -Random access to all lines of a file. -.op -Find lines by number or pattern. -Patterns may include: -specified characters, -don't care characters, -choices among characters, -repetitions of these constructs, -beginning of line, -end of line. -.op -Add, delete, change, copy, move or join lines. -.op -Permute or split contents of a line. -.op -Replace one or all instances of a pattern within a line. -.op -Combine or split files. -.op -Escape to Shell (command language) during editing. -.ne3 -.op -Do any of above operations on -every pattern-selected line in a given range. -.OP -Optional encryption for extra security. -.sh PTX -Make a permuted (key word in context) index. -.sh SPELL -Look for spelling errors by comparing each word in a -document against a word list. -.OP -25,000-word list includes proper names. -.OP -Handles common prefixes and suffixes. -.OP -Collects words to help tailor local spelling lists. -.sh LOOK -Search for words in dictionary that begin with specified prefix. -.sh TYPO -Look for spelling errors by a statistical technique; -not limited to English. -.sh CRYPT -Encrypt and decrypt files for security. -.NH 2 -Document Formatting -.LP -.sh ROFF -A typesetting program for terminals. -Easy for nontechnical people to learn, and good -for simple documents. -Input consists of data lines intermixed with control lines, -such as -.ta 8n -.ti 10 -.li -.sp 2 insert two lines of space -.ti10 -.li -.ce center the next line -.br -ROFF is deemed to be obsolete; -it is intended only for casual use. -.op -Justification of either or both margins. -.op -Automatic hyphenation. -.op -Generalized running heads and feet, with even-odd page -capability, numbering, etc. -.op -Definable macros for frequently used -control sequences (no substitutable arguments). -.op -All 4 margins and page size dynamically adjustable. -.op -Hanging indents and one-line indents. -.op -Absolute and relative parameter settings. -.op -Optional legal-style numbering of output lines. -.op -Multiple file capability. -.OP -Not usable as a filter. -.sh TROFF -.sh NROFF -Advanced typesetting. -TROFF drives a Graphic Systems phototypesetter; -NROFF drives ascii terminals of all types. -This summary was typeset using TROFF. -TROFF and NROFF style is similar to ROFF, but they are capable of much more elaborate -feats of formatting, -when appropriately programmed. -TROFF and NROFF accept the same input language. -.op -All ROFF capabilities available or definable. -.op -Completely definable page format keyed to dynamically planted -``interrupts'' at specified lines. -.op -Maintains several separately definable typesetting environments (e.g., one for -body text, one for footnotes, and one for unusually elaborate -headings). -.op -Arbitrary number of output pools can be combined at will. -.op -Macros with substitutable arguments, and macros invocable -in mid-line. -.op -Computation and printing of numerical quantities. -.op -Conditional execution of macros. -.op -Tabular layout facility. -.op -Positions expressible in inches, centimeters, ems, points, -machine units -or arithmetic combinations thereof. -.op -Access to character-width computation for unusually difficult -layout problems. -.op -Overstrikes, built-up brackets, horizontal and vertical line drawing. -.op -Dynamic relative or absolute positioning and size selection, -globally or at the character level. -.op -Can exploit the characteristics of the terminal being used, -for approximating special characters, reverse motions, -proportional spacing, etc. -.LP -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. -.LP -NROFF will produce multicolumn output on terminals capable of reverse line feed, -or through the postprocessor COL. -.LP -High programming skill is required to exploit the formatting -capabilities of TROFF and NROFF, although unskilled personnel 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 produce -approximate proof copy on terminals -before actual typesetting. -The preprocessors MS, TBL, and REFER are fully compatible -with TROFF and NROFF. -.sh MS -A standardized manuscript layout package -for use with NROFF/TROFF. -This document was formatted with MS. -.op -Page numbers and draft dates. -.op -Automatically numbered subheads. -.op -Footnotes. -.op -Single or double column. -.op -Paragraphing, display and indentation. -.op -Numbered equations. -.sh 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: -.DS -sigma sup 2 ~=~ 1 over N sum from i=1 to N ( x sub i \- x bar ) sup 2 -.DE -which produces: -.EQ -sigma sup 2 ~=~ 1 over N sum from i=1 to N ( x sub i - x bar ) sup 2 -.EN -.op -Automatic calculation of size changes for subscripts, sub-subscripts, -etc. -.op -Full vocabulary of Greek letters and special symbols, such as `gamma', `GAMMA', `integral'. -.op -Automatic calculation of large bracket sizes. -.op -Vertical ``piling'' of formulae for matrices, conditional -alternatives, etc. -.op -Integrals, sums, etc., with arbitrarily complex limits. -.op -Diacriticals: dots, double dots, hats, bars, etc. -.op -Easily learned by nonprogrammers and mathematical typists. -.sh 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, those based on Diablo printing mechanism. -.op -Same facilities as EQN within graphical capability of -terminal. -.sh TBL -A preprocessor for NROFF/TROFF -that translates simple descriptions of table layouts -and contents into detailed typesetting instructions. -.op -Computes column widths. -.op -Handles left- and right-justified columns, -centered columns and decimal-point -alignment. -.op -Places column titles. -.op -Table entries can be text, -which is adjusted to fit. -.op -Can box all or parts of table. -.sh REFER -Fills in bibliographic citations in a document -from a data base (not supplied). -.op -References may be printed in any style, -as they occur or collected at the end. -.op -May be numbered sequentially, by name of author, etc. -.sh TC -Simulate Graphic Systems typesetter on Tektronix 4014 scope. -Useful for checking TROFF page layout before typesetting. -.sh GREEK -Fancy printing on Diablo-mechanism terminals -like DASI-300 and DASI-450, -and on Tektronix 4014. -.op -Gives half-line forward and reverse motions. -.op -Approximates Greek letters and other special characters -by overstriking. -.sh COL -Canonicalize files with reverse line feeds -for one-pass printing. -.sh DEROFF -Remove all TROFF commands from input. -.sh CHECKEQ -Check document for possible errors in EQN usage. //GO.SYSIN DD hel3 echo hel4 sed 's/.//' >hel4 <<'//GO.SYSIN DD hel4' -.NH -Information Handling -.LP -.sh SORT -Sort or merge ASCII files line-by-line. -No limit on input size. -.op -Sort up or down. -.op -Sort lexicographically or on numeric key. -.op -Multiple keys located by delimiters or by character position. -.op -May sort upper case together with lower into dictionary order. -.OP -Optionally suppress duplicate data. -.sh TSORT -Topological sort \(em converts a partial order into a total order. -.sh UNIQ -Collapse successive duplicate lines -in a file into one line. -.op -Publish lines that were originally unique, -duplicated, or both. -.op -May give redundancy count for each line. -.sh TR -Do one-to-one character translation according to -an arbitrary code. -.op -May coalesce selected repeated characters. -.op -May delete selected characters. -.sh DIFF -Report line changes, additions and deletions necessary to bring two files -into agreement. -.op -May produce an editor script to convert one file into another. -.op -A variant compares two new versions against one old one. -.sh 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. -.sh JOIN -Combine two files by joining records that have identical keys. -.sh GREP -Print all lines in a file that satisfy -a pattern as used in the editor ED. -.op -May print all lines that fail to match. -.op -May print count of hits. -.op -May print first hit in each file. -.sh LOOK -Binary search in sorted file for lines -with specified prefix. -.sh WC -Count the lines, ``words'' (blank-separated strings) and characters in a file. -.sh SED -Stream-oriented version of ED. -Can perform a sequence of editing operations on -each line of an -input stream of unbounded length. -.op -Lines may be selected by address or range of addresses. -.op -Control flow and conditional testing. -.op -Multiple output streams. -.op -Multi-line capability. -.sh AWK -Pattern scanning and processing language. -Searches input for patterns, and -performs actions on each line of input that satisfies -the pattern. -.op -Patterns include regular expressions, -arithmetic and lexicographic conditions, -boolean combinations and ranges of these. -.op -Data treated as string or numeric as appropriate. -.op -Can break input into fields; -fields are variables. -.op -Variables and arrays (with non-numeric subscripts). -.op -Full set of arithmetic operators and control flow. -.op -Multiple output streams to files and pipes. -.op -Output can be formatted as desired. -.op -Multi-line capabilities. //GO.SYSIN DD hel4 echo hel5 sed 's/.//' >hel5 <<'//GO.SYSIN DD hel5' -.NH -Graphics -.LP -The programs in this section are predominantly intended for use -with Tektronix 4014 storage scopes. -.sh GRAPH -Prepares a graph of a set of input numbers. -.op -Input scaled to fit standard plotting area. -.op -Abscissae may be supplied automatically. -.op -Graph may be labeled. -.op -Control over grid style, line style, graph orientation, etc. -.sh SPLINE -Provides a smooth curve through a set of points -intended for GRAPH. -.sh PLOT -A set of filters for printing graphs produced by GRAPH -and other programs -on various terminals. -Filters provided for -4014, DASI terminals, Versatec printer/plotter. //GO.SYSIN DD hel5 echo hel6 sed 's/.//' >hel6 <<'//GO.SYSIN DD hel6' -.NH -Novelties, Games, and Things That Didn't Fit Anywhere Else -.LP -.sh BACKGAMMON -.br -A player of modest accomplishment. -.sh CHESS -Plays good class D chess. -.sh CHECKERS -Ditto, for checkers. -.sh BCD -Converts ascii to card-image form. -.sh PPT -Converts ascii to paper tape form. -.sh BJ -A blackjack dealer. -.sh CUBIC -An accomplished player of 4\(mu4\(mu4 tic-tac-toe. -.sh MAZE -Constructs random mazes for you to solve. -.sh MOO -A fascinating number-guessing game. -.sh CAL -Print a calendar of specified month and year. -.sh BANNER -Print output in huge letters. -.sh CHING -The -.ul -I Ching. -Place your own interpretation on the output. -.sh FORTUNE -Presents a random fortune cookie on each invocation. -Limited jar of cookies included. -.sh UNITS -Convert amounts between different scales of measurement. -Knows hundreds of units. -For example, how many km/sec is a parsec/megayear? -.sh TTT -A tic-tac-toe program that learns. -It never makes the same mistake twice. -.sh ARITHMETIC -.br -Speed and accuracy test for number facts. -.sh FACTOR -Factor large integers. -.sh QUIZ -Test your knowledge of Shakespeare, Presidents, capitals, etc. -.sh WUMP -Hunt the wumpus, thrilling search in a dangerous cave. -.sh REVERSI -A two person board game, -isomorphic to -Othello\(rg. -.sh HANGMAN -Word-guessing game. -Uses the dictionary supplied with SPELL. -.sh FISH -Children's card-guessing game. //GO.SYSIN DD hel6