#-h- acat 1213 asc 22-jul-83 17:04:31 sventek (joseph sventek) Acat (1) 11-Mar-82 Acat (1) NAME Acat - concatenate nested archive entries on standard output SYNOPSIS acat archive`module[`module...] ... DESCRIPTION `acat' performs the equivalent function to `cat' on archive files created by the `ar' utility. The true power of `acat' lies in its ability to extract the modules from within nested archives. Some examples may help clarify its use. Suppose the file arch1 consists of the modules mod1a, mod1b and mod1c. In addition, mod1c is itself an archive, consisting of modules mod2a and mod2b. The command line % acat arch1`mod1a is equivalent to the `ar' command % ar p arch1 mod1a More importantly, if the user desires to see mod2a in mod1c in arch1, the command %acat arch1`mod1a`mod2a will do the trick. FILES SEE ALSO ar - archive file maintainer cat - concatenate files DIAGNOSTICS AUTHORS Joe Sventek BUGS/DEFICIENCIES -1- #-h- admin 1471 asc 22-jul-83 17:04:33 sventek (joseph sventek) Admin (1) 14-Sep-81 Admin (1) NAME Admin - administer TCS file. SYNOPSIS admin -ifile file.tcs DESCRIPTION Admin -i enters a text file into the TCS system for the first time. File is the source file to be entered into the system. Local convention is to use the name "file.tcs" for files maintained by TCS. The file is tagged as Version #1.1 and the user is prompted for initial comments concerning the development of the file. The date, time and user ID are recorded in the statistics portion of the file. FILES A scratch file is used while creating the output file and moved upon completion of input. SEE ALSO delta, get DIAGNOSTICS usage: admin -ifile file.tcs Correct calling format is provided when called without arguments. - flag missing Incorrect calling procedure. -i... filename missing The input filename is expected to be immediately adjacent to the -i flag. (no white-space) Invalid flag -i is the only valid flag at present. AUTHORS Neil Groundwater at ADI. BUGS/DEFICIENCIES -1- #-h- alist 1138 asc 22-jul-83 17:04:34 sventek (joseph sventek) Alist (1) 11-Jan-79 Alist (1) NAME Alist - generate paginated listing of source archive SYNOPSIS alist [file] ... DESCRIPTION `alist' generates a paginated listing of archive files. A table of contents with the relative page number in the listing is displayed first, with each element of the archive file starting on a new page. The second page of the listing contains a sorted index of entries, with the starting page number. If no files are specified, the standard input is read. `alist' considers each line which starts with the string "#-h-" to be the beginning of a new entry, so that nested archives will be handled reasonably. The listing is displayed on standard output, and may be piped into lpr to queue to the printer. FILES SEE ALSO pr - print files DIAGNOSTICS AUTHORS Joe Sventek BUGS/DEFICIENCIES -1- #-h- apropos 1191 asc 22-jul-83 17:04:35 sventek (joseph sventek) Apropos (1) 22-Jul-83 Apropos (1) NAME Apropos - locate manual entries matching user-specified patterns SYNOPSIS apropos pattern [pattern] ... DESCRIPTION apropos searches the on-line documentation system for entries which match the regular expression patterns supplied in the command line. For each entry so found, a one-line synopsis of the entry (similar to the one displayed by the tool `intro') is displayed on standard output, with the section where the entry may be found. The `man' utility can then be used to retrieve more information on the topic. EXAMPLES To get a list of all entries having anything to do with the mail system, type the following command: apropos mail FILES Accesses the known files for each section in the ~man directory. SEE ALSO The tools 'intro' and 'man'; the Unix command 'man' DIAGNOSTICS AUTHORS Joe Sventek. -1- #-h- ar 10215 asc 22-jul-83 17:04:38 sventek (joseph sventek) Ar (1) 11-Oct-79 Ar (1) NAME Ar - archive file maintainer SYNOPSIS ar {dpstux}[v/1] arcname [file] ... DESCRIPTION Ar collects sets of arbitrary files into one big file and maintains that file as an 'archive'. Files can be extracted from the archive, new ones can be added, old ones can be deleted or replaced by updated versions, and data about the contents can be listed. If a minus sign ('-') is given as a file name, further file names are read from the standard input, one file name per line. Files that are to be added to an archive must exist as files with the name given. Files that are extracted from an archive will be put onto files with the name given. Files that are added to archives can, of course, be archive files themselves. There is no (theoretical) limit to the number of files that can be nested this way. Thus Ar provides the utility necessary to maintain tree-structured file directories. Ar is invoked by the command line Ar command archname [optional filenames] where 'command' is any one of 'uxtpds', optionally concatenated with 'v' or '1', specifying what operation to perform on the archive file named 'archname'. The possible commands are: u - Update named archive by replacing existing files or adding new ones at end. If the 'v' option is used, file names will be printed on the standard output as files are written to the new archived file. x - Extract named files from archive. Put onto file of the same name. If the 'v' option is added, file names will be printed on the standard output as files are extracted. d - Delete named files from archive. If the 'v' option is used, file names will be printed on the standard output as they are deleted from the archive. -1- Ar (1) 11-Oct-79 Ar (1) p - Print named files on standard output. Using the 'v' option will cause the file name to precede the file. t - Print table of archive contents. Normally, the table will contain only the file name. If the 'v' option is used, the table will also contain the file's length, type, and date and time of last change. By default, if the standard output is a terminal, ar will pack five names per line in the non-verbose mode. If the optional '1' option is used, the output is force to single column, which is the default is standard output is not a terminal. For example, ar t archive might generate the following output: a b c d whereas ar t1 archive would generate a b c d s - Salvage. This command may be used to recover a damaged archive whose character counts do not reflect the correct number of characters in the file. The 's' command extracts all files from the archive, ignoring characters counts, date and time stamps, etc. on the archive header lines; it simply uses '#-h-, which begins each archive member, and the file name which follows it. The files are then replaced in the archive, with corrected character counts. Thus, the 's' flag is useful for salvaging the contents of 'alien' archive files and for saving damaged archives. It does not work on nested archives (i.e. archives within archives). v - Verbose. This command may be concatenated to any of the above commands, and will cause the archiver -2- Ar (1) 11-Oct-79 Ar (1) to print additional information, generally file names, on the standard output. Its specific action for each command has already been described. The optional filenames in the command line specify individual files that may participate in the action. If no files are named, the action is done on ALL files in the archive, but if any files are explicitly named, they are the ONLY ones that take part in the action. (The 'd' command is an exception--files may be deleted only by specifying their names.) FILES A file 'arctemp' is created and subsequently deleted for each run. SEE ALSO The Unix commands 'ar' and 'ls' in the Unix manual `rar' - rearrange archive DIAGNOSTICS archive not in proper format The basic problem is that archive didn't find a header line where one was expected. Typical reasons include misspelling the file name, using an existing file (not in archive format) on a creation run, and referencing an archive file that has been modified directly (say with the editor). delete by name only For user protection, files are allowed to be deleted from an archive only by specifying each file name. duplicate file name A file was listed more than once when calling the archiver fatal errors-archive not altered This message is generated whenever one or more of the other errors have been detected. An archive is never altered unless EVERYTHING has run properly. too many file names At the present the user may call the archiver with no more than 25 files at a time. usage: ar [dptuxsv] arcname [files] The command line passed to the archiver is in error. Possibly the command is wrong or the archived file name has not been given. -3- Ar (1) 11-Oct-79 Ar (1) 'filename': can't add The file specified by 'filename' doesn't exist or can't be opened (e. g. is locked). 'filename': can't create The archiver could not generate a local file by the name of 'filename'. Probably the archiver's internal file buffer space has been exceeded. 'filename': not in archive The archiver could not locate the file specified by 'filename' in the archived file. AUTHORS Original code from Kernighan and Plauger's 'Software Tools', with modifications by Debbie Scherrer. BUGS/DEFICIENCIES On some systems only text files can be archived. When the update and print commands are used, the files are updated or printed in the order they appear on the archived file, NOT the order listed on the command line. The 's' salvage command works only on unnested archives. The Unix archiver allows files to be positioned in the archive, rather than simply added at the end as Ar does. This is done by adding the following commands: m - Move specified files to end of archive ma posname - Move specified files to position after file 'posname' mb posname - Move specified files to position before file 'posname' r - Replace specified files and place at end of archive ra posname - Replace files and place after file 'posname' rb posname - Replace files and place before file 'posname' There are some discrepancies between the Unix version of Ar -4- Ar (1) 11-Oct-79 Ar (1) and this version. Unix uses 'r'--replace instead of 'u'--update. Unix also requires the user to specify an additional command 'n' when creating a new archive. -5- #-h- args 1905 asc 22-jul-83 17:04:44 sventek (joseph sventek) Args (1) 25-Aug-80 Args (1) NAME Args - use standard input as arguments for command SYNOPSIS args [-v] tool [arguments] DESCRIPTION Args reads the standard input file and concatenates the words found there onto the arguments passed to it. It then spawns the tool "tool" with those arguments. The first argument to Args which does not start with a "-" is taken to be the name of the tool to be invoked. Args uses the same search path as the shell, and if "tool" is a script file, a copy of the shell will be spawned reading that file for its commands. The optional -v argument causes Args to display the final command line on ERROUT before spawning the sub-process. The most common use of Args is as a form of argument explosion, as in the following example: Suppose you wish to delete all files which have the string "tst" somewhere in the filename. This may be accomplished with the following shell command line: % ls tst | args rm -v All of the files matching the pattern "tst" will be fed to Args, which will concatenate the names onto Rm's command line. Rm will then be spawned, and will print the name of each file as it is deleted. If the information found on standard input is so voluminous as to cause the argument string to be too large, the command line is displayed on ERROUT and the process is NOT spawned. FILES none SEE ALSO sh - command line interpreter (for search path rules) AUTHORS Joe Sventek BUGS/DEFICIENCIES -1- #-h- asam 1167 asc 22-jul-83 17:04:48 sventek (joseph sventek) Asam (1) 11-Mar-82 Asam (1) NAME Asam - generate index for archive file SYNOPSIS asam use as the character for plotting the ordinate instead of ``|'' (the default) -f use to fill the area under the bar -F use to fill the area over the bar -h output column headers -m[c] display the mean of the data, using ``c'' if specified instead of ``.'' (the default) -r[c] display ruling every 10% under the bar, using ``c'' if specified instead of ``:'' (the default) -R[c] display ruling every 10% over the bar, using ``c'' if specified instead of ``:'' (the default) -s plot the running sum of the data values rather than the values themselves -w make the graph 132 columns wide rather than 80 EXAMPLES bargraph -h -f* -w file would make a 132-column wide graph of the data in ``file'', with column headers and ``*'' characters filling under the bar. d "-f16n 9c" | bargraph "-f|" would graph the sizes of all files in the current directory using ``|'' as the fill character below the bar. Note that it is necessary to put quotes around character specification options when specifying characters that are special to the -1- BarGraph (1) 11-Nov-81 BarGraph (1) shell (the "-f|" in the above example). FILES none SEE ALSO DIAGNOSTICS ? Too much data: increase TABLE_SIZE AUTHORS Dave Martin (Hughes Aircraft) BUGS/DEFICIENCIES There is an upper limit to the number of points which may be graphed. This limit may be raised by increasing the value of TABLE_SIZE. Numeric values are currently limited to 7 digits or less. -2- #-h- box 1842 asc 22-jul-83 17:05:06 sventek (joseph sventek) Box (1) 23-Jul-81 Box (1) NAME Box - draw boxes around block structure of RatFor or C programs SYNOPSIS box [-e] [-d{device}] [-] file ... DESCRIPTION Box draws boxes around statement groups (beginning with "{" and ending with "}") to make them more legible. It is designed to be used as a pretty-printer for RatFor or C code that is indented as follows: level 0 { level 1 { level 2 } level 1 } level 0 For this input, box generates: level 0 +-------------+ | level 1 | | +---------+ | | | level 2 | | | +---------+ | | level 1 | +-------------+ level 0 The alignment of the "{" and "}" characters and the indentation of 2 spaces per level are required for proper operation. If TABs are present in the input, they are replaced with blanks, on the assumption of 8 spaces per TAB. The "-d" option takes advantage of the line-drawing character sets on certain devices; currently the DEC vt100 and the Heath h19 are supported. EXAMPLES box -dvt100 myfile box the file "myfile" to STDOUT (assumed to be a vt100) AUTHORS Dave Martin (Hughes Aircraft) -1- Box (1) 23-Jul-81 Box (1) BUGS/DEFICIENCIES -2- #-h- cat 1469 asc 22-jul-83 17:05:10 sventek (joseph sventek) Cat (1) 16-Feb-78 Cat (1) NAME Cat - concatenate and print text files SYNOPSIS cat [-v] [file] ... DESCRIPTION `cat' reads each file in sequence and writes it on the standard output. Thus cat file prints the file, and cat file1 file2 >file3 concatenates the first two files and places the result on the third. If no argument or '-' is given, `cat' reads the standard input. If the '-v' option is specified, all control characters are displayed as '^C', where C is the character that must be typed with the CTRL key when entering the character. If any DEL(RUB) characters are found, they are displayed as '^?'. A dollar sign character ('$') is displayed at the end of each line to aid in location of trailing blanks in lines. FILES none SEE ALSO The "Software Tools" book, p. 77. The UNIX tools cat, PR, CP DIAGNOSTICS A message is printed if a file cannot be opened; further processing is terminated. AUTHORS Dennis Hall, Debbie Scherrer and Wen-Sue Gee. BUGS/DEFICIENCIES Using the same file for output as well as input may cause strange results. -1- #-h- ccnt 834 asc 22-jul-83 17:05:12 sventek (joseph sventek) Ccnt (1) 11-Jan-79 Ccnt (1) NAME Ccnt - character count SYNOPSIS ccnt [file] ... DESCRIPTION ccnt counts characters in the named file(s). Newlines are counted as characters. If no file name or the file '-' is given, standard input will be read. FILES none SEE ALSO wcnt - count words lcnt - count lines the Unix command `wc' DIAGNOSTICS A message is printed if an input file cannot be opened; further processing is terminated. AUTHORS Original from Kernighan and Plauger's 'Software Tools', with minor modifications by Debbie Scherrer. BUGS/DEFICIENCIES -1- #-h- cd 1031 asc 22-jul-83 17:05:14 sventek (joseph sventek) Cd (1) 02-May-81 Cd (1) NAME Cd - change working directory SYNOPSIS cd [directory] DESCRIPTION `cd' changes the working directory to `directory'. If no argument is given, the working directory is changed to the previous working directory. Since a new process is created to execute each command, `cd' would be ineffective if it were written as a normal command. As a result, it is recognized and executed by the shell. Valid forms of the directory on RSX-11M/IAS are /ddnn/ggg,mmm /ggg,mmm ddnn:[ggg,mmm] [ggg,mmm] FILES None SEE ALSO pwd - print working directory DIAGNOSTICS AUTHORS BUGS/DEFICIENCIES -1- #-h- ch 5665 asc 22-jul-83 17:05:17 sventek (joseph sventek) Ch (1) 7-Apr-78 Ch (1) NAME Ch - make changes in text files SYNOPSIS ch [-ax] [expression] ... fromexpr [toexpr] DESCRIPTION ch copies each line of the standard input to the standard output, globally substituting the text pattern "toexpr" for "fromexpr" on each line that satisfies matching criteria defined by the leading expressions "expression" and the switches. (A text pattern is a subset of a "regular expression"--see the "ed" writeup for a complete description.) Three possible courses of action are taken depending upon the number of text patterns(n) found in the command line: n=1 The text pattern is assumed to be "fromexpr" with a null "toexpr"; it is equivalent to the ed command g/fromexpr/s///g n=2 The first text pattern is "fromexpr", the second is "toexpr"; it is equivalent to the ed command g/fromexpr/s//toexpr/g n>=3 The (n-1)th pattern is "fromexpr", the nth is "toexpr" and patterns 1...n-2 are used to determine the lines upon which to perform the substitution. The default is that any line which matches any one of the n-2 leading expressions are eligible for substitution. If the -a flag is specified, only lines which match all n-2 leading expressions in any order are eligible. If the -x flag is specified, all lines which don't satisfy the above criteria are eligible. (See the writeup on find for more information.) In particular, if n=3, ch expr from to is equivalent to the ed command g/expr/s/from/to/g ch -x expr from to is equivalent to the ed command x/expr/s/from/to/g The substitution string "toexpr" may be a string of replacement characters, null to effect a deletion, or it may include the special "ditto" character "&" to put back the "fromexpr" string and thus effect an insertion. It may also contain the expressions `$1' ... `$9', which cause the corresponding tagged pattern in the input to be inserted. If a deletion is desired with the multiple leading tag expressions, a "toexpr" of "" -i.e. quotes around an empty string may be used. A text pattern consists of the following elements: -1- Ch (1) 7-Apr-78 Ch (1) c literal character ? any character except newline % beginning of line $ end of line (null string before newline) [...] character class (any one of these characters) [!...] negated character class (all but these characters) {expr} tagged pattern (referenced by $1 ... $9) * closure (zero or more occurrences of previous pattern) + anchored closure (one or more occurrences of previous pattern) @c escaped character (e.g., @%, @[, @*) Any special meaning of characters in a text pattern is lost when escaped, inside [...], or for: % not at beginning $ not at end * at beginning + at beginning A character class consists of zero or more of the following elements, surrounded by [ and ]: c literal character a-b range of characters (digits, lower or upper case) ! negated character class if at beginning @c escaped character (@! @- @ @]) Special meaning of characters in a character class is lost when escaped or for ! not at beginning - at beginning or end An escape sequence consists of the character @ followed by a single character: @f formfeed @l linefeed @n newline @r return @t tab @OOO the octal digit representation for an ASCII character for example, @001 for the ASCII character SOH @c c (including @) For a complete description, see "Software Tools" pages 135-154. Care should be taken when using the characters % $ [ ] ! * + @ and any shell characters in the text pattern. It is often necessary to enclose the entire substitution pattern in quotes. -2- Ch (1) 7-Apr-78 Ch (1) FILES none SEE ALSO The UNIX tool GRES The tools find and ed xch - extended change utility DIAGNOSTICS An error message is printed if the pattern given is illegal. AUTHORS 'CH' was originally implemented on BKY by Debbie Scherrer from Kernighan and Plauger's "Software Tools". Major modifications were performed by Joe Sventek. BUGS/DEFICIENCIES A minus sign(dash[-]) may not start an expression. -3- #-h- chd 972 asc 22-jul-83 17:05:22 sventek (joseph sventek) Chd (1) 12-Mar-82 Chd (1) NAME Chd - change working disk and directory from MCR SYNOPSIS chd dev:[dir] OR chd /dev/dir DESCRIPTION `chd', when installed as "...CHD", permits the user to change both disk device and directory at one time from MCR, in the same manner as the `cd' command to the shell. If the change is successful, `chd' will display the new disk and directory to the user before exiting. If the disk name is not specified, then only the directory (UIC) will be changed. Note that `chd' will NOT permit you to change to a directory (UIC) which does not exist. FILES SEE ALSO cd - change working directory DIAGNOSTICS AUTHORS Joe Sventek BUGS/DEFICIENCIES -1- #-h- cmp 1215 asc 22-jul-83 17:05:24 sventek (joseph sventek) Cmp (1) 6-Mar-78 Cmp (1) NAME Cmp - compare two files SYNOPSIS cmp file1 [file2] DESCRIPTION file1 is compared line-by-line with file2. If file2 is not specified, standard input is used. If any lines differ, cmp announces the line number and prints each file's offending line. FILES none SEE ALSO comm The UNIX commands cmp, diff, and comm DIAGNOSTICS If the end of one file is reached before the end of the other, a message is printed. AUTHORS Acquired from "Software Tools" by Kernighan and Plauger, with minor modifications made by Debbie Scherrer. BUGS/DEFICIENCIES If either file is binary, spurious results should be expected. Cmp cannot handle offset lines: line n of file1 is simply compared to line n of file2. Trailing blanks are significant, which will cause some lines to appear similar to the user which are actually different. -1- #-h- comm 1405 asc 22-jul-83 17:05:26 sventek (joseph sventek) Comm (1) 11-Jan-79 Comm (1) NAME Comm - print lines common to two files SYNOPSIS comm [-123] file1 [file2] DESCRIPTION comm reads file1 and file2, which should be sorted, and produces a three column output: lines only in file1, lines only in file2, and lines in both files. The filename '-' means the standard input. If there is only one file argument, file2 refers to the standard input. The optional arguments -1, -2, and -3 specify the printing of only the corresponding column. Thus "comm -3" prints only the lines common to both files, and "comm -12" prints lines which are in either file, but not in both. The default is -123. FILES none SEE ALSO cmp - compare two files the Unix tool "diff" DIAGNOSTICS A message is printed if an input file cannot be opened. AUTHORS Debbie Scherrer BUGS/DEFICIENCIES The flags used by this tool are the reverse of those used by the Unix 'comm'. In Unix, the flags 1, 2, and 3 suppress printing of the corresponding column. Kernighan, on page 126 of 'Software Tools' suggests the version used above. -1- #-h- cpress 856 asc 22-jul-83 17:05:28 sventek (joseph sventek) Cpress (1) 15-Jan-79 Cpress (1) NAME Cpress - compress input files SYNOPSIS cpress [file] ... DESCRIPTION cpress compresses runs of repeated characters in the input files. The output file can eventually be expanded with the tool 'expand'. If no input files are given, or the filename '-' appears, input will be from the standard input. FILES none SEE ALSO expand DIAGNOSTICS A message is printed if an input file cannot be opened; further processing is terminated. AUTHORS From Kernighan & Plauger's 'Software Tools', with modifications by Debbie Scherrer. BUGS/DEFICIENCIES -1- #-h- crt 1367 asc 22-jul-83 17:05:29 sventek (joseph sventek) Crt (1) 15-Nov-81 Crt (1) NAME Crt - copy files to terminal a screen at a time SYNOPSIS crt [-n] [file] ... DESCRIPTION crt is similar to 'cat' except that it prints only n lines (default 22) at a time. After each set of lines are printed, crt will wait for instructions from the user. Hitting a SPACE or RETURN will cause the next n lines to appear, hitting a 'q' (quit) will cause crt to skip over to the next input file (if any), and hitting an end-of-file character (^Z) will cause crt to stop immediately. If no files are specified, or if the filename '-' is given, lines will be read from the standard input. The flag -n may be given, where n specifies the number of lines desired at a time. crt will stop at the end of each file (except the last), as well as after each n lines. FILES none SEE ALSO cat DIAGNOSTICS A message is printed if an input file cannot be opened; further processing is terminated. AUTHORS Debbie Scherrer; Modified to use RARE i/o by Dave Martin. BUGS/DEFICIENCIES -1- #-h- crypt 1259 asc 22-jul-83 17:05:31 sventek (joseph sventek) Crypt (1) 15-Jan-79 Crypt (1) NAME Crypt - crypt and decrypt standard input SYNOPSIS crypt key DESCRIPTION crypt encrypts characters on the standard input by using 'key'. The file can eventually be decrypted by running it back through crypt with the same key. Double encryption (encrypting a file with first one key and then another) is allowable, but on some systems the decryption must be done in the exact reverse order as encryption was done. The encryption algorithm used by 'crypt' is not a complicated one, so users requiring a great degree of protection should not rely on this tool. FILES none SEE ALSO DIAGNOSTICS AUTHORS Original from Kernighan & Plauger's 'Software Tools', with modifications by Debbie Scherrer. (NOTE: the original encryption algorithm has been altered slightly.) BUGS/DEFICIENCIES On IAS and VMS systems, double encryption must be decrypted in the exact reverse order as the encryption. -1- #-h- date 712 asc 22-jul-83 17:05:33 sventek (joseph sventek) Date (1) 13-Jun-79 Date (1) NAME Date - print the date SYNOPSIS date [-n] DESCRIPTION The current day of the week, date, time, and time zone are printed in the format: day dd-mmm-yy hh:mm:ss zone if the -n switch is used the date is output in the following format: day mm/dd/yy hh:mm:ss zone FILES none SEE ALSO The Unix command 'date' DIAGNOSTICS none AUTHORS Debbie Scherrer BUGS/DEFICIENCIES -1- #-h- dc 5129 asc 22-jul-83 17:05:35 sventek (joseph sventek) Dc (1) 20-Jul-80 Dc (1) NAME Dc - desk calculator SYNOPSIS dc [file] ... DESCRIPTION dc evaluates integer expressions from the source files, one expression per input line. If no input files are given, or the filename '-' is specified, dc reads from the standard input. Ordinarily dc operates on decimal integer arithmetic expressions, but the user may specify an input base and output base other than decimal. Expressions may be simple arithmetic expressions or replacement expressions. The values of simple expressions are written on standard output when they are evaluated. Replacement expressions are used to hold temporary values, and are not automatically printed. A simple expression is a normal arithmetic expression using numbers, variables, parentheses, and the following operators, listed in order of precedence: + - unary plus and negation operators. These may only appear at the start of a simple expression or after a "(" ** exponentiation * / % multiply, divide, modulo (remainder) + - add, subtract == != relations - equals, not equal to, > >= greater than, greater than or equal to, < <= less than, less than or equal to (!=, ^=, ~= all treated as "not equal") ! unary logical not (also ~ and ^) | & logical or, and The logical operators ! | & and the relational operators result in the values 1 for true and 0 for false. A replacement expression is: name = simple expression -1- Dc (1) 20-Jul-80 Dc (1) where 'name' is a character string of (virtually) any length, starting with a letter and consisting of only letters and digits. (The characters a-f should not be considered letters when operating in hexadecimal mode.) Variables are automatically declared when they first appear to the left of an "=" sign, and they should not be used in a simple expression until they have been declared. Radix Control Radix control is available in 2 ways: 1) There are default radix values for both input and output which may be changed by setting the predefined variables 'ibase' (input base) and 'obase' (output base). (Radix 10 is always used to evaluate and/or print radix-defining expressions.) For example, ibase = 2 obase = 16 would accept input in binary and print results in hexadecimal. 2) The radix of individual numbers may be explicitly given by following the number with an underscore character and then the desired radix. For example, 100_16 would specify the hex number 100 (256 in decimal). EXAMPLES 10 + (-64 / 2**4) would print the answer "6" temp = 101_2 temp == 5 would print the answer "1" (true) ibase = 16 obase = 2 1a + f would print the answer "101001" ibase = 16 numa = 100_10 numb = 100 numa + numb would print the answer "356" -2- Dc (1) 20-Jul-80 Dc (1) FILES none SEE ALSO macro, the UNIX M4 macro package The UNIX tools dc and bc DIAGNOSTICS arith evaluation stack overflow arithmetic expressions have been nested too deeply. The size of the stack is set by the MAXSTACK definition in the source code. number error an input number has a number/character bigger than the current radix expression error invalid arithmetic expression AUTHORS Philip H. Scherrer (Stanford U.) BUGS/DEFICIENCIES dc only works with integers The maximum value allowed depends on the host machine and is the largest Fortran integer -3- #-h- delta 3511 asc 22-jul-83 17:05:38 sventek (joseph sventek) Delta (1) 14-Sep-81 Delta (1) NAME Delta - make an TCS delta SYNOPSIS delta revision history [newhistory] DESCRIPTION Delta integrates the current "revision" of a file into its TCS "history" file or into a "newhistory" file. Differences between this version and the preceeding version are computed and the TCS file will be able to reproduce either version (or earlier versions) by means of the GET command. The user is requested to provide a reason-for-change when prompted by "History?". Multiple lines may be entered to describe changes and terminated by '.' on a line by itself. FILES A scratch file is created during processing, then copied onto the "history". If a "newhistory" is given, the result will be moved there instead. SEE ALSO admin, get DIAGNOSTICS usage: delta revision history [newhistory] Correct calling format is provided when called without arguments. TCS Version Number corrupted. Unexpected EOF on history-info scan. Unexpected EOF on history-data scan. The TCS code seems to be present but garbled. Refer to a guru. Sudden death in input An end-of-file was detected while requesting the "reason for change". Revision file is empty Perhaps an incorrect filename was given. History file is empty The first formal version is entered by means of the ADMIN command. Files are too big to handle The DIFF algorithm table-size has been exceeded. Current version supports files of approximately -1- Delta (1) 14-Sep-81 Delta (1) 15000-lines. Cannot locate TCS history file. Unable to read filename specified as the history file. Temp file error: (filename) The tempoary file created during processing disappeared unexpectedly. AUTHORS An Algorithm for Differential File Comparison by J.W.Hunt and M.D.McIlroy (BTL Computing Science Technical Report #41). Original code by Wil Baden; converted from MORTRAN by Dave Murray. Modifications and conversion to BTL-SCCS style by Neil Groundwater at ADI. The Source Code Control System was introduced by Marc J. Rochkind in the December, 1975, IEEE Transactions on Software Engineering. BUGS/DEFICIENCIES File permissions are NOT manipluated to restrict users from disturbing the maintained files. Version numbering ranges from 1.1 to 1.N where N is a very large number. Provision to increment the "primary" number upon demand is scheduled. Branching capabilities are scheduled to be implemented. -2- #-h- detab 989 asc 22-jul-83 17:05:40 sventek (joseph sventek) Detab (1) 12-Aug-81 Detab (1) NAME Detab - convert tabs to spaces SYNOPSIS detab [...] [+] [file] ... DESCRIPTION detab converts tab characters (control-i) to equivalent strings of blanks. Tab stops are indicated by ... (default 8, 16, ...), while + indicates tab stops every columns. Thus the command detab 5 21 +5 supplies blanks for tabs terminating at column positions 5, 21, 26, etc. If no files are specified, the standard input is read. An isolated minus sign also indicates the standard input. SEE ALSO entab lpr AUTHORS Original from Kernighan & Plauger's 'Software Tools', with modifications by Dennis Hall and Debbie Scherrer. BUGS/DEFICIENCIES -1- #-h- diff 4542 asc 22-jul-83 17:05:42 sventek (joseph sventek) Diff (1) 20-Mar-80 Diff (1) NAME Diff - isolate differences between files SYNOPSIS diff [-{c|d|r|s|v}] old_file [new_file] DESCRIPTION 'Diff' compares the contents of two files and reports on the differences between them. The default behavior is to describe the insert, delete, and change operations that must be performed on `old_file' to convert its contents into those of `new_file'. The second file name argument is optional. If omitted, the standard input is read for the text of the `new_file'. The options currently available are: -c Perform a simple line-by-line comparison. 'Diff' will compare successive lines of the input files; if any corresponding lines differ, or if one file is shorter than the other, 'diff' prints the message "different" and exits. If the files are the same, 'diff' produces no output. When the "-v" option (see below) is specified, 'diff' prints the lines that differ along with their line number in the input file, and notifies the user if one file is shorter than the other. -d List the "differences" between the two files, by highlighting the insertions, deletions, and changes that will convert `old_file' into `new_file'. This is the default option. If the "verbose" option "-v" (see below) is specified, unchanged text will also be listed. -r Insert text formatter requests to mark the `new_file' with revision bars and deletion asterisks. This option is particularly useful for maintenance of large documents, like Software Tools reference manuals. (At present, only GT's version of 'format' can produce revision bars.) -s Output a "script" of commands for the text editor 'ed' that will convert `old_file' into `new_file'. This is handy for preparing updates to large programs or data files, since generally the volume of changes required will be much -1- Diff (1) 20-Mar-80 Diff (1) smaller than the new text in its entirety. -v Make output "verbose." This option applies to the "-c" and "-d" options discussed above. If not selected, 'diff' produces "concise" output; if selected, 'diff' produces more verbiage. 'Diff' is based on the algorithm found in Heckel, P., "A Technique for Isolating Differences Between Files", _C_o_m_m_. _A_C_M 21, 4 (April 1978), 264-268. EXAMPLES To print the differences between two files on your terminal: diff -cv file maybe_the_same_file does a simple line-by-line comparison on the two files, printing lines which differ. (Expects no missing or extra lines.) Same as 'cmp file1 file2'. diff -s old_version new_version | ed - old_version make an ed script which changes 'old_version' into 'new_version' diff -r old_manual.fmt new_manual.fmt | format to mark changes in a document. Useful only if your version of 'format' has this capability. diff -s old new >>update_old_to_new to keep a list of changes made to an original source file DIAGNOSTICS ": can't open" if either `new_file' or `old_file' is not readable. "Usage: diff . . ." for illegal options. AUTHORS Allen Akin and friends, Georgia Institute of Technology BUGS/DEFICIENCIES The algorithm used has one quirk: a line or a block of lines which is not unique within a file will be labeled as an insertion (deletion) if its immediately adjacent neighbors both above and below are labeled as insertions (deletions). Fails on very large files (> 10000 lines on VMS). -2- #-h- e 1846 asc 22-jul-83 17:05:44 sventek (joseph sventek) E (1) 12-Aug-81 E (1) NAME E - extended version of "ed" with command editing & history SYNOPSIS e [-] [-pprompt] [-n] [-v] [file] DESCRIPTION e is an extended version of ed which uses virtual memory rather than a scratch file for its text storage. This makes it considerably faster than ed. In addition, command editing & history are supported; see the writeup on "esh" for more information. Other commands and features which may not have found their way into ed: 1. There is a terse help command, invoked via `h'. 2. One can cause the current contents of the buffer to be roffed by issuing the "typeset" command via `t'. This causes format to be spawned, formatting the buffer contents to the terminal. The buffer contents are not affected. If more sophisticated use of format is necessary, or you deires to spawn something other than format, see the ed writeup for the `^' command. 3. A command is available to see how much of the virtual memory array space has been used via `%'. If you exhaust the array space with many changes, simply writing the file followed by the enter command will cause garbage collection to occur. For information on the other commands to e, consult the manual entry for ed. FILES AUTHORS The extra features of e above those of ed are due to Dave Martin. SEE ALSO ed - text editor BUGS/DEFICIENCIES -1- #-h- echo 583 asc 22-jul-83 17:05:46 sventek (joseph sventek) Echo (1) 7-Jul-78 Echo (1) NAME Echo - echo command line arguments SYNOPSIS echo [arg] ... DESCRIPTION Echo writes its arguments in order as a line on the standard output file. It is useful for producing messages and diagnostics in command files. FILES none SEE ALSO The Unix command "echo" DIAGNOSTICS none AUTHORS Debbie Scherrer -1- #-h- ed 23775 asc 22-jul-83 17:05:50 sventek (joseph sventek) Ed (1) 21-Apr-78 Ed (1) NAME Ed - line-oriented text editor SYNOPSIS ed [-] [-pstring] [-n] [-v] [file] DESCRIPTION Ed is a text editor. If the 'file' argument is given, the file is read into ed's buffer so that it can be edited and its name is remembered for possible future use. Ed operates on a copy of any file it is editing; changes made in the copy have no effect on the file until a w (write) command is given. The optional '-' suppresses the printing of line counts by the e (edit), r (read), and w (write) commands. The -p flag may be used to specify ed's prompt string. The default is ": ". If prompting is not desired, a bare -p in the command line will turn it off. The -n flag indicates that you want to see line numbers prepended to each line of the buffer. The -v flag indicates that each command is to be echoed on error output as it is executed. Ed accepts commands from script files as well as a terminal. To do this, invoke ed and substitute the script file name for the standard input, as follows - ed [file]