# To unbundle, run this file echo ac.1m sed 's/.//' >ac.1m <<'//GO.SYSIN DD ac.1m' -.TH AC 1M -.SH NAME -ac \- login accounting -.SH SYNOPSIS -.B ac -[ -.B \-w -wtmp ] [ -.B \-p -] [ -.B \-d -] [ people ] ... -.SH DESCRIPTION -.I Ac -produces a printout giving -connect time -for each user who has logged in -during the life of the current -.I wtmp -file. -A total is also produced. -.B \-w -is used to specify an alternate -.IR wtmp "" -file. -.B \-p -prints individual totals; without this option, -only totals are printed. -.B \-d -causes a printout for each midnight to midnight -period. -Any -.I people -will limit the -printout to only the specified login names. -If no -.IR wtmp "" -file is given, -.I /usr/adm/wtmp -is used. -.PP -The accounting file -.I /usr/adm/wtmp -is maintained by -.I init -and -.I login. -Neither of these programs creates the file, -so if it does not exist -no connect-time accounting is done. -To start accounting, it should be created with length 0. -On the other hand if the file is left undisturbed it will -grow without bound, so periodically any information -desired should be collected and the file truncated. -.SH FILES -/usr/adm/wtmp -.SH "SEE ALSO" -init(8), login(1), utmp(5). //GO.SYSIN DD ac.1m echo adb.1 sed 's/.//' >adb.1 <<'//GO.SYSIN DD adb.1' -.ds TW \v'.25m'\s+2~\s-2\v'-.25m' -.ds ST \v'.25m'*\v'-.25m' -.ds IM \v'.1m'=\v'-.1m'\s-2\h'-.1m'>\h'.1m'\s+2 -.ds LE \(<= -.ds LT \s-2<\s+2 -.ds GT \s-2>\s+2 -.TH ADB 1 -.SH NAME -adb \- debugger -.SH SYNOPSIS -.B adb -[\fB\-w\fR] [ objfil [ corfil ] ] -.SH DESCRIPTION -.I Adb -is a general purpose debugging program. -It may be used to examine files and to provide -a controlled environment for the execution -of UNIX programs. -.PP -.I Objfil -is normally an executable program file, preferably -containing a symbol table; -if not then the -symbolic features of -.I adb -cannot be used although the file can still -be examined. -The default for -.I objfil -is -.B a.out. -.I Corfil -is assumed to be a core image file produced after -executing -.IR objfil ; -the default for -.I corfil -is -.B core. -.PP -Requests to -.I adb -are read from the standard input and -responses are to the standard output. -If the -.B \-w -flag is present then both -.I objfil -and -.I corfil -are -created if necessary and -opened for reading and writing -so that files can be modified using -.IR adb . -.I Adb -ignores QUIT; INTERRUPT -causes return to the next -.I adb -command. -.PP -In general requests to -.I adb -are of the form -.PP -.if n .ti 16 -.if t .ti 1.6i -[\|\fIaddress\fR\|] [\|, -.IR count \|] -[\|\fIcommand\fR\|] [\|;\|] -.PP -If -.I address -is present then -.I dot -is set to -.IR address . -Initially -.I dot -is set to 0. -For most commands -.I count -specifies how many times -the command will be executed. -The default -.I count -is 1. -.I Address -and -.I count -are expressions. -.PP -The interpretation of an address depends -on the context it is used in. -If a subprocess is being debugged then -addresses are interpreted -in the usual way in the address space of the subprocess. -For further details of address mapping see -.SM ADDRESSES. -.SH EXPRESSIONS -.TP 7.2n -.B . -The value of -.IR dot . -.TP 7.2n -+ -The value of -.I dot -incremented by the current increment. -.TP 7.2n -^ -The value of -.I dot -decremented by the current increment. -.TP 7.2n -" -The last -.I address -typed. -.TP 7.2n -.I integer -An octal number if -.I integer -begins with a 0; -a hexadecimal number if preceded by -.BR # ; -otherwise a decimal number. -.TP 7.2n -.IB integer . fraction -A 32 bit floating point number. -.TP 7.2n -.I \'cccc\|\' -The ASCII value of up to 4 characters. -\\ may be used to escape a \'. -.TP 7.2n -.I \*(LT name -The value of -.IR name , -which is either a variable name or a register name. -.I Adb -maintains a number of variables -(see -.SM VARIABLES\*S) -named by single letters or digits. -If -.I name -is a register name then -the value of the register is obtained from -the system header in -.IR corfil . -The register names are -.BR "r0 ... r5 sp pc ps" "." -.TP 7.2n -.I symbol -A -.I symbol -is a sequence -of upper or lower case letters, underscores or -digits, not starting with a digit. -.BR \\ " may be used to escape other characters." -The value of the -.I symbol -is taken from the symbol table -in -.IR objfil . -An initial \_ or \*(TW will be prepended to -.I symbol -if needed. -.TP -.I _ symbol -In C, the `true name' of an external symbol begins with _. -It may be necessary to utter this name to disinguish it -from internal or hidden variables of a program. -.TP 7.2n -.IB routine . name -The address of the variable -.I name -in the specified -C routine. -Both -.I routine -and -.I name -are -.IR symbols . -If -.I name -is omitted the value is the address of the -most recently activated C stack frame -corresponding to -.IR routine . -.TP 7.2n -.RI ( exp \|) -The value of the expression -.IR exp . -.LP -.SM -.B "Monadic\ operators" -.TP 7.2n -.RI \*(ST exp -The contents of the location addressed -by -.I exp -in -.IR corfil . -.TP 7.2n -.RI @ exp -The contents of the location addressed by -.I exp -in -.IR objfil . -.TP 7.2n -.RI \- exp -Integer negation. -.TP 7.2n -.RI \*(TW exp -Bitwise complement. -.LP -.B "Dyadic\ operators" -are left associative -and are less binding than monadic operators. -.TP 7.2n -.IR e1 + e2 -Integer addition. -.TP 7.2n -.IR e1 \- e2 -Integer subtraction. -.TP 7.2n -.IR e1 \*(ST e2 -Integer multiplication. -.TP 7.2n -.IR e1 % e2 -Integer division. -.TP 7.2n -.IR e1 & e2 -Bitwise conjunction. -.TP 7.2n -.IR e1 \(bv e2 -Bitwise disjunction. -.TP 7.2n -.IR e1 # e2 -.I E1 -rounded up to the next multiple of -.IR e2 . -.DT -.SH COMMANDS -Most commands consist of a verb followed by a modifier or list -of modifiers. -The following verbs are available. -(The commands `?' and `/' may be followed by `\*(ST'; -see -.SM ADDRESSES -for further details.) -.TP .5i -.RI ? f -Locations starting at -.I address -in -.I objfil -are printed according to the format -.IR f . -.TP -.RI / f -Locations starting at -.I address -in -.I corfil -are printed according to the format -.IR f . -.TP -.RI = f -The value of -.I address -itself is printed in the -styles indicated by the format -.IR f . -(For -.B i -format `?' is printed for the parts of the instruction that reference -subsequent words.) -.PP -A -.I format -consists of one or more characters that specify a style -of printing. -Each format character may be preceded by a decimal integer -that is a repeat count for the format character. -While stepping through a format -.I dot -is incremented temporarily -by the amount given for each format letter. -If no format is given then the last format is used. -The format letters available are as follows. -.ta 2.5n .5i -.RS -.TP -.BR o " 2" -Print 2 bytes in octal. -All octal numbers output by -.I adb -are preceded by 0. -.br -.ns -.TP -.BR O " 4" -Print 4 bytes in octal. -.br -.ns -.TP -.BR q " 2" -Print in signed octal. -.br -.ns -.TP -.BR Q " 4" -Print long signed octal. -.br -.ns -.TP -.BR d " 2" -Print in decimal. -.br -.ns -.TP -.BR D " 4" -Print long decimal. -.br -.ns -.TP -.BR x " 2" -Print 2 bytes in hexadecimal. -.br -.ns -.TP -.BR X " 4" -Print 4 bytes in hexadecimal. -.br -.ns -.TP -.BR u " 2" -Print as an unsigned decimal number. -.br -.ns -.TP -.BR U " 4" -Print long unsigned decimal. -.br -.ns -.TP -.BR f " 4" -Print the 32 bit value -as a floating point number. -.br -.ns -.TP -.BR F " 8" -Print double floating point. -.br -.ns -.TP -.BR b " 1" -Print the addressed byte in octal. -.br -.ns -.TP -.BR c " 1" -Print the addressed character. -.br -.ns -.TP -.BR C " 1" -Print the addressed character using -the following escape convention. -Character values 000 to 040 are printed as @ followed by the corresponding -character in the range 0100 to 0140. -The character @ is printed as @@. -.br -.ns -.TP -.BI s " n" -Print the addressed characters until a zero character -is reached. -.br -.ns -.TP -.BI S " n" -Print a string using -the @ escape convention. -.I n -is the length of the string including its zero terminator. -.br -.ns -.TP -.BR Y " 4" -Print 4 bytes in date format (see -.IR ctime (3)). -.br -.ns -.TP -.BR i " n" -Print as PDP11 instructions. -.I n -is the number of bytes occupied by the instruction. -This style of printing causes variables 1 and 2 to be set -to the offset parts of the source and destination respectively. -.br -.ns -.TP -.BR a " 0" -Print the value of -.I dot -in symbolic form. -Symbols are checked to ensure that they have an appropriate -type as indicated below. -.LP - / local or global data symbol -.br - ? local or global text symbol -.br - = local or global absolute symbol -.TP -.BR p " 2" -Print the addressed value in symbolic form using -the same rules for symbol lookup as -.BR a . -.br -.ns -.TP -.BR t " 0" -When preceded by an integer tabs to the next -appropriate tab stop. -For example, -.B 8t -moves to the next 8-space tab stop. -.br -.ns -.TP -.BR r " 0" -Print a space. -.br -.ns -.TP -.BR n " 0" -Print a newline. -.br -.ns -.tr '" -.TP -.BR '...' " 0" -Print the enclosed string. -.br -.tr '' -.br -.ns -.TP -.B ^ -.I Dot -is decremented by the current increment. -Nothing is printed. -.br -.ns -.TP -+ -.I Dot -is incremented by 1. -Nothing is printed. -.br -.ns -.TP -\- -.I Dot -is decremented by 1. -Nothing is printed. -.RE -.TP -newline -If the previous command temporarily incremented -.IR dot , -make the increment permanent. -Repeat the previous command with a -.I count -of 1. -.TP -.RB [ ?/ ] l "\fI value mask\fR" -Words starting at -.I dot -are masked with -.I mask -and compared with -.I value -until -a match is found. -If -.B L -is used then the match is for 4 bytes at a time instead of 2. -If no match is found then -.I dot -is unchanged; otherwise -.I dot -is set to the matched location. -If -.I mask -is omitted then \-1 is used. -.TP -.RB [ ?/ ] w "\fI value ...\fR" -Write the 2-byte -.I value -into the addressed -location. -If the command is -.BR W , -write 4 bytes. -Odd addresses are not allowed when writing to the subprocess -address space. -.TP -[\fB?/\fR]\fBm\fI b1 e1 f1\fR[\fB?/\fR] -.br -New values for -.RI ( b1,\ e1,\ f1 ) -are recorded. -If less than three expressions are given then -the remaining map parameters are left unchanged. -If the `?' or `/' is followed by `\*(ST' then -the second segment (\fIb2\fR\|,\|\fIe2\fR\|,\|\fIf2\fR) -of the mapping is changed. -If the list is terminated by `?' or `/' then the file -(\fIobjfil\fR or -.I corfil -respectively) is used -for subsequent requests. -(So that, for example, `/m?' will cause `/' to refer to -.IR objfil .) -.TP -.BI \*(GT name -.I Dot -is assigned to the variable or register named. -.TP -.B ! -A shell is called to read the -rest of the line following `!'. -.TP -.RI $ modifier -Miscellaneous commands. -The available -.I modifiers -are: -.RS -.TP -.BI < f -Read commands from the file -.I f -and return. -.br -.ns -.TP -.BI > f -Send output to the file -.I f, -which is created if it does not exist. -.br -.ns -.TP -.B r -Print the general registers and -the instruction addressed by -.BR pc . -.I Dot -is set to \fBpc\fR. -.br -.ns -.TP -.B f -Print the floating registers in -single or double length. -If the floating point status of -.B ps -is set to double (0200 bit) -then double length is used anyway. -.br -.ns -.TP -.B b -Print all breakpoints -and their associated counts and commands. -.br -.ns -.TP -.B a -ALGOL 68 stack backtrace. -If -.I address -is given then it is taken to be the -address of the current frame (instead of -.BR r4 ). -If -.I count -is given then only the first -.I count -frames are printed. -.br -.ns -.TP -.B c -C stack backtrace. -If -.I address -is given then it is taken as the -address of the current frame (instead of -.BR r5 ). -If -.B C -is used then the names and (16 bit) values of all automatic -and static variables are printed for each active function. -If -.I count -is given then only the first -.I count -frames are printed. -.br -.ns -.TP -.B e -The names and values of -external variables are printed. -.br -.ns -.TP -.B w -Set the page width for output to -.I address -(default 80). -.br -.ns -.TP -.B s -Set the limit for symbol matches to -.I address -(default 255). -.br -.ns -.TP -.B o -All integers input are regarded as octal. -.br -.ns -.TP -.B d -Reset integer input as described in -.SM EXPRESSIONS. -.br -.ns -.TP -.B q -Exit from -.IR adb . -.br -.ns -.TP -.B v -Print all non zero variables in octal. -.br -.ns -.TP -.B m -Print the address map. -.RE -.TP -.BI : modifier -Manage a subprocess. -Available modifiers are: -.RS -.TP -.BI b c -Set breakpoint at -.IR address . -The breakpoint is executed -.IR count \-1 -times before -causing a stop. -Each time the breakpoint is encountered -the command -.I c -is executed. -If this command sets -.I dot -to zero -then the breakpoint causes a stop. -.TP -.B d -Delete breakpoint at -.IR address . -.TP -.B r -Run -.I objfil -as a subprocess. -If -.I address -is given explicitly then the -program is entered at this point; otherwise -the program is entered at its standard entry point. -.I count -specifies how many breakpoints are to be -ignored before stopping. -Arguments to the subprocess may be supplied on the -same line as the command. -An argument starting with < or > causes the standard -input or output to be established for the command. -All signals are turned on on entry to the subprocess. -.TP -.BI c s -The subprocess is continued -with signal -.I s -c -.I s, -see -.IR signal (2). -If -.I address -is given then the subprocess -is continued at this address. -If no signal is specified then the signal -that caused the subprocess to stop is sent. -Breakpoint skipping is the same -as for -.BR r . -.TP -.BI s s -As for -.B c -except that -the subprocess is single stepped -.I count -times. -If there is no current subprocess then -.I objfil -is run -as a subprocess as for -.BR r . -In this case no signal can be sent; the remainder of the line -is treated as arguments to the subprocess. -.TP -.B k -The current subprocess, if any, is terminated. -.RE -.SH VARIABLES -.I Adb -provides a number of variables. -Named variables are set initially by -.I adb -but are not used subsequently. -Numbered variables are reserved for communication -as follows. -.TP -0 -The last value printed. -.br -.ns -.TP -1 -The last offset part of an instruction source. -.br -.ns -.TP -2 -The previous value of variable 1. -.PP -On entry the following are set -from the system header in the -.IR corfil . -If -.I corfil -does not appear to be a -.B core -file then -these values are set from -.IR objfil . -.TP -b -The base address of the data segment. -.br -.ns -.TP -d -The data segment size. -.br -.ns -.TP -e -The entry point. -.br -.ns -.TP -m -The `magic' number (0405, 0407, 0410 or 0411). -.br -.ns -.TP -s -The stack segment size. -.br -.ns -.TP -t -The text segment size. -.SH ADDRESSES -The address in a file associated with -a written address is determined by a mapping -associated with that file. -Each mapping is represented by two triples -.RI ( "b1, e1, f1" ) -and -.RI ( "b2, e2, f2" ) -and the -.I file address -corresponding to a written -.I address -is calculated as follows. -.PP -.if t .ti 1.5i -.if n .ti 8 -.IR b1 \*(LE address < e1 -\*(IM -.IR "file address" = address + f1\-b1, -otherwise, -.PP -.if t .ti 1.5i -.if n .ti 8 -.IR b2 \*(LE address < e2 -\*(IM -.IR "file address" = address + f2\-b2, -.PP -otherwise, the requested -.I address -is not legal. -In some cases (e.g. for programs with separated I and D -space) the two segments for a file may overlap. -If a -.B ? -or -.B / -is followed by an -.B \*(ST -then only the second -triple is used. -.PP -The initial setting of both mappings is suitable for -normal -.B a.out -and -.B core -files. -If either file is not of the kind expected then, for that file, -.I b1 -is set to 0, -.I e1 -is set to -the maximum file size -and -.I f1 -is set to 0; in this way the whole -file can be examined with no address translation. -.PP -So that -.I adb -may be used on large files -all appropriate values are kept as signed 32 bit integers. -.SH FILES -/dev/mem -.br -/dev/swap -.br -a.out -.br -core -.SH SEE\ ALSO -ptrace(2), -a.out(5), -core(5) -.SH DIAGNOSTICS -`Adb' when there is no current command or format. -Comments about inaccessible files, syntax errors, -abnormal termination of commands, etc. -Exit status is 0, unless last command failed or -returned nonzero status. -.SH BUGS -A breakpoint set at the entry point is not effective -on initial entry to the program. -.br -When single stepping, system calls do not count as an -executed instruction. -.br -Local variables whose names are the same as an external -variable may foul up the accessing of the external. //GO.SYSIN DD adb.1 echo ar.1 sed 's/.//' >ar.1 <<'//GO.SYSIN DD ar.1' -.TH AR 1 -.SH NAME -ar \- archive and library maintainer -.SH SYNOPSIS -.B ar -key [ posname ] afile name ... -.SH DESCRIPTION -.I Ar -maintains groups of files -combined into a single archive file. -Its main use -is to create and update library files as used by the loader. -It can be used, though, for any similar purpose. -.PP -.I Key -is one character from the set -.B drqtpmx, -optionally concatenated with -one or more of -.B vuaibcl. -.I Afile -is the archive file. -The -.I names -are constituent files in the archive file. -The meanings of the -.I key -characters are: -.TP -.B d -Delete the named files from the archive file. -.TP -.B r -Replace the named files in the archive file. -If the optional character -.B u -is used with -.B r, -then only those files with -modified dates later than -the archive files are replaced. -If an optional positioning character from the set -.B abi -is used, then the -.I posname -argument must be present -and specifies that new files are to be placed -after -.RB ( a ) -or before -.RB ( b -or -.BR i ) -.IR posname . -Otherwise -new files are placed at the end. -.TP -.B q -Quickly append the named files to the end of the archive file. -Optional positioning characters are invalid. -The command does not check whether the added members -are already in the archive. -Useful only to avoid quadratic behavior when creating a large -archive piece-by-piece. -.TP -.B t -Print a table of contents of the archive file. -If no names are given, all files in the archive are tabled. -If names are given, only those files are tabled. -.TP -.B p -Print the named files in the archive. -.TP -.B m -Move the named files to the end of the archive. -If a positioning character is present, -then the -.I posname -argument must be present and, -as in -.B r, -specifies where the files are to be moved. -.TP -.B x -Extract the named files. -If no names are given, all files in the archive are -extracted. -In neither case does -.B x -alter the archive file. -.TP -.B v -Verbose. -Under the verbose option, -.I ar -gives a file-by-file -description of the making of a -new archive file from the old archive and the constituent files. -When used with -.B t, -it gives a long listing of all information about the files. -When used with -.BR p , -it precedes each file with a name. -.TP -.B c -Create. -Normally -.I ar -will create -.I afile -when it needs to. -The create option suppresses the -normal message that is produced when -.I afile -is created. -.TP -.B l -Local. -Normally -.I ar -places its temporary files in the directory /tmp. -This option causes them to be placed in the local directory. -.SH FILES -/tmp/v* temporaries -.SH "SEE ALSO" -ld(1), ar(5), -lorder(1) -.SH BUGS -If the same file is mentioned twice in an argument list, -it may be put in the archive twice. //GO.SYSIN DD ar.1 echo arcv.1m sed 's/.//' >arcv.1m <<'//GO.SYSIN DD arcv.1m' -.TH ARCV 1M -.SH NAME -arcv \- convert archives to new format -.SH SYNOPSIS -.B arcv -file ... -.SH DESCRIPTION -.I Arcv -converts archive files -(see -.IR ar (1), -.IR ar (5)) -from 6th edition to 7th edition format. -The conversion is done in place, and the command -refuses to alter a file not in old archive format. -.PP -Old archives are marked with a magic number of 0177555 at the start; -new archives have 0177545. -.SH FILES -/tmp/v*, temporary copy -.SH SEE ALSO -ar(1), ar(5) //GO.SYSIN DD arcv.1m echo as.1 sed 's/.//' >as.1 <<'//GO.SYSIN DD as.1' -.TH AS 1 PDP11 -.SH NAME -as \- assembler -.SH SYNOPSIS -.B as -[ -.B \- -] [ -.B \-o -objfile -] file ... -.SH DESCRIPTION -.I As -assembles the concatenation of the named files. -If the optional first argument -.B \- -is used, -all undefined symbols in the assembly -are treated as global. -.PP -The output of the assembly is left on the file -.I objfile; -if that is omitted, -.B a.out -is used. -It is executable if no errors occurred -during the assembly, -and if there were no unresolved external references. -.SH FILES -/lib/as2 pass 2 of the assembler -.br -/tmp/atm[1-3]? temporary -.br -a.out object -.SH "SEE ALSO" -ld(1), -nm(1), -adb(1), -a.out(5) -.br -.I "UNIX Assembler Manual" -by D. M. Ritchie -.SH DIAGNOSTICS -When -an input file cannot be read, its name -followed by a question mark is typed and assembly -ceases. -When syntactic or semantic errors occur, a single-character diagnostic is typed out -together with the line number and the file name in which it -occurred. -Errors in pass 1 cause cancellation of pass 2. -The possible errors are: -.PP -.ta 3 -) Parentheses error -.br -] Parentheses error -.br -< String not terminated properly -.br -* Indirection used illegally -.br -.li -\fB.\fR Illegal assignment to `\fB.\fR' -.br -a Error in address -.br -b Branch instruction is odd or too remote -.br -e Error in expression -.br -f Error in local (`f' or `b') type symbol -.br -g Garbage (unknown) character -.br -i End of file inside an if -.br -m Multiply defined symbol as label -.br -o Word quantity assembled at odd address -.br -p `\fB.\fR' different in pass 1 and 2 -.br -r Relocation error -.br -u Undefined symbol -.br -x Syntax error -.br -.SH BUGS -Syntax errors can cause incorrect line numbers -in following diagnostics. //GO.SYSIN DD as.1 echo at.1 sed 's/.//' >at.1 <<'//GO.SYSIN DD at.1' -.TH AT 1 -.SH NAME -at \- execute commands at a later time -.SH SYNOPSIS -.B at -time -[ -day -] -[ -file -] -.SH DESCRIPTION -.I At -squirrels away a copy of the named -.I file -(standard input default) -to be used as input to -.IR sh (1) -at a specified later time. -A -.IR cd (1) -command to the current directory is inserted -at the beginning, -followed by assignments to all environment variables. -When the script is run, it uses the user and group ID -of the creator of the copy file. -.PP -The -.I time -is 1 to 4 digits, with an optional following -`A', `P', `N' or `M' for -AM, PM, noon or midnight. -One and two digit numbers are taken to be hours, three and four digits -to be hours and minutes. -If no letters follow the digits, a 24 hour clock time is understood. -.PP -The optional -.I day -is either -(1) a month name followed by a day number, -or -(2) a day of the week; if the word `week' follows -invocation is moved seven days further off. -Names of months and days may be recognizably truncated. -Examples of legitimate commands are -.IP -at 8am jan 24 -.br -at 1530 fr week -.PP -.I At -programs are executed by periodic execution -of the command -.I /usr/lib/atrun -from -.IR cron (8). -The granularity of -.I at -depends upon how often -.I atrun -is executed. -.PP -Standard output or error output is lost unless redirected. -.SH FILES -/usr/spool/at/yy.ddd.hhhh.uu -.br -activity to be performed at hour -.I hhhh -of year day -.I ddd -of year -.IR yy . -.I uu -is a unique number. -.br -/usr/spool/at/lasttimedone contains -.I hhhh -for last hour of activity. -.br -/usr/spool/at/past directory of activities now in progress -.br -/usr/lib/atrun program that executes activities that -are due -.br -pwd(1) -.SH "SEE ALSO" -calendar(1), -cron(8) -.SH DIAGNOSTICS -Complains about various syntax errors and times out of range. -.SH BUGS -Due to the granularity of the execution of -.I /usr/lib/atrun, -there may be bugs in scheduling things almost -exactly 24 hours into the future. //GO.SYSIN DD at.1 echo awk.1 sed 's/.//' >awk.1 <<'//GO.SYSIN DD awk.1' -.TH AWK 1 -.SH NAME -awk \- pattern scanning and processing language -.SH SYNOPSIS -.B awk -[ -.BI \-F c -] -[ prog ] [ file ] ... -.SH DESCRIPTION -.I Awk -scans each input -.I file -for lines that match any of a set of patterns specified in -.IR prog . -With each pattern in -.I prog -there can be an associated action that will be performed -when a line of a -.I file -matches the pattern. -The set of patterns may appear literally as -.I prog, -or in a file -specified as -.B \-f -.IR file . -.PP -Files are read in order; -if there are no files, the standard input is read. -The file name `\-' -means the standard input. -Each line is matched against the -pattern portion of every pattern-action statement; -the associated action is performed for each matched pattern. -.PP -An input line is made up of fields separated by white space. -(This default can be changed by using FS, -.IR "vide infra" ".)" -The fields are denoted $1, $2, ... ; -$0 refers to the entire line. -.PP -.PP -A pattern-action statement has the form -.PP - pattern { action } -.PP -A missing { action } means print the line; -a missing pattern always matches. -.PP -An action is a sequence of statements. -A statement can be one of the following: -.PP -.nf - if ( conditional ) statement [ else statement ] - while ( conditional ) statement - for ( expression ; conditional ; expression ) statement - break - continue - { [ statement ] ... } - variable = expression - print [ expression-list ] [ >expression ] - printf format [ , expression-list ] [ >expression ] - next # skip remaining patterns on this input line - exit # skip the rest of the input -.fi -.PP -Statements are terminated by -semicolons, newlines or right braces. -An empty expression-list stands for the whole line. -Expressions take on string or numeric values as appropriate, -and are built using the operators -+, \-, *, /, %, and concatenation (indicated by a blank). -The C operators ++, \-\-, +=, \-=, *=, /=, and %= -are also available in expressions. -Variables may be scalars, array elements -(denoted -x[i]) -or fields. -Variables are initialized to the null string. -Array subscripts may be any string, -not necessarily numeric; -this allows for a form of associative memory. -String constants are quoted "...". -.PP -The -.I print -statement prints its arguments on the standard output -(or on a file if -.I >file -is present), separated by the current output field separator, -and terminated by the output record separator. -The -.I printf -statement formats its expression list according to the format -(see -.IR printf (3)). -.PP -The built-in function -.I length -returns the length of its argument -taken as a string, -or of the whole line if no argument. -There are also built-in functions -.I exp, -.I log, -.I sqrt, -and -.IR int . -The last truncates its argument to an integer. -.IR substr(s,\ m,\ n) -returns the -.IR n -character -substring of -.I s -that begins at position -.IR m . -The function -.IR sprintf(fmt,\ expr,\ expr,\ ...) -formats the expressions -according to the -.IR printf (3) -format given by -.I fmt -and returns the resulting string. -.PP -Patterns are arbitrary Boolean combinations -(!, \(or\(or, &&, and parentheses) of -regular expressions and -relational expressions. -Regular expressions must be surrounded -by slashes and are as in -.IR egrep . -Isolated regular expressions -in a pattern apply to the entire line. -Regular expressions may also occur in -relational expressions. -.PP -A pattern may consist of two patterns separated by a comma; -in this case, the action is performed for all lines -between an occurrence of the first pattern -and the next occurrence of the second. -.PP -.nf -A relational expression is one of the following: -.PP -.nf - expression matchop regular-expression - expression relop expression -.PP -.fi -where a relop is any of the six relational operators in C, -and a matchop is either ~ (for contains) -or !~ (for does not contain). -A conditional is an arithmetic expression, -a relational expression, -or a Boolean combination -of these. -.PP -The special patterns -BEGIN -and -END -may be used to capture control before the first input line is read -and after the last. -BEGIN must be the first pattern, END the last. -.PP -A single character -.I c -may be used to separate the fields by starting -the program with -.PP - BEGIN { FS = "c" } -.PP -or by using the -.BI \-F c -option. -.PP -Other variable names with special meanings -include NF, the number of fields in the current record; -NR, the ordinal number of the current record; -FILENAME, the name of the current input file; -OFS, the output field separator (default blank); -ORS, the output record separator (default newline); -and -OFMT, the output format for numbers (default "%.6g"). -.PP -.SH EXAMPLES -.PP -Print lines longer than 72 characters: -.PP -.nf - length > 72 -.fi -.PP -Print first two fields in opposite order: -.PP -.nf - { print $2, $1 } -.fi -.PP -Add up first column, print sum and average: -.PP -.nf - { s += $1 } - END { print "sum is", s, " average is", s/NR } -.fi -.PP -Print fields in reverse order: -.PP -.nf - { for (i = NF; i > 0; \-\-i) print $i } -.fi -.PP -Print all lines between start/stop pairs: -.PP -.nf - /start/, /stop/ -.fi -.PP -Print all lines whose first field is different from previous one: -.PP -.nf - $1 != prev { print; prev = $1 } -.fi -.SH SEE ALSO -.PP -lex(1), sed(1) -.br -A. V. Aho, B. W. Kernighan, P. J. Weinberger, -.I -Awk \- a pattern scanning and processing language -.SH BUGS -There are no explicit conversions between numbers and strings. -To force an expression to be treated as a number add 0 to it; -to force it to be treated as a string concatenate "" -to it. //GO.SYSIN DD awk.1 echo bas.1 sed 's/.//' >bas.1 <<'//GO.SYSIN DD bas.1' -.TH BAS 1 -.SH NAME -bas \- basic -.SH SYNOPSIS -.B bas -[ file ] -.SH DESCRIPTION -.I Bas -is a dialect of Basic. -If a file argument is provided, -the file is used for input before the terminal -is read. -.I Bas -accepts lines of the form: -.PP - statement - integer statement -.PP -Integer numbered statements -(known as internal statements) -are stored for later execution. -They are stored in sorted ascending order. -Non-numbered statements are immediately executed. -The result of an immediate expression statement -(that does not have `=' as its highest operator) is printed. -Interrupts suspend computation. -.PP -Statements have the following syntax: -.HP 5 -expression -.br -The expression is executed for its side -effects (assignment or function call) -or for printing as described above. -.HP 5 -.B comment -.li -... -.br -This statement is ignored. -It is used to interject commentary in a program. -.HP 5 -.B done -.br -Return to system level. -.HP 5 -.B dump -.br -The name and current value of every -variable is printed. -.HP 5 -.B edit -.br -The UNIX editor, -.I ed, -is invoked with the -.I file -argument. -After the editor exits, -this file is recompiled. -.HP 5 -.B for -name -.B = -expression expression statement -.br -.br -.ns -.HP 5 -.B for -name -.B = -expression expression -.br -.li -... -.br -.ns -.HP 5 -.B next -.br -The -.I for -statement -repetitively executes a -statement (first form) -or a group of statements (second form) -under control of a named variable. -The variable takes on the value of -the first expression, -then is incremented by one on each loop, -not to exceed the value of -the second expression. -.HP 5 -.B goto -expression -.br -The expression is evaluated, truncated to an integer -and execution goes to the corresponding integer numbered statment. -If executed from immediate mode, -the internal statements are compiled first. -.HP 5 -.B if -expression statement -.br -.br -.ns -.HP 5 -.B if -expression -.br -.li -... -.br -.ns -.HP 5 -[ -.B else -.br -.li -... ] -.br -.ns -.HP 5 -.B fi -.br -The statement (first form) -or group of statements (second form) -is executed if the expression evaluates -to non-zero. -In the second form, -an optional -.B else -allows for a group of statements to be -executed when the first group is not. -.HP 5 -.B list -[expression [expression]] -.br -.br list -is used to print out the stored internal statements. -If no arguments are given, all internal statements are printed. -If one argument is given, only that -internal statement is listed. -If two arguments are given, all internal statements -inclusively between the arguments are printed. -.HP 5 -.B print -list -.br -The list of expressions and strings are concatenated and -printed. -(A string is delimited by " characters.) -.HP 5 -.B prompt -list -.br -.I Prompt -is the same as -.I print -except that no newline character is -printed. -.HP 5 -.B return -[expression] -.br -The expression is evaluated and the result is passed -back as the value of a function call. -If no expression is given, zero is returned. -.HP 5 -.B run -.br -The internal statements are compiled. -The symbol table is re-initialized. -The random number generator is reset. -Control is passed to the lowest numbered internal -statement. -.HP 5 -.B save -[expression [expression]] -.br -.I Save -is like -.I list -except that the output -is written on the -.I file -argument. -If no argument is given on the command, -.B b.out -is used. -.PP -Expressions have the following syntax: -.HP 5 -name -.br -A name is used to specify a variable. -Names are composed of a letter -followed by letters and digits. -The first four characters of a name are significant. -.HP 5 -number -.br -A number is used to represent a constant value. -A number is written in Fortran style, -and contains digits, an optional decimal point, -and possibly a scale factor consisting -of an -.B e -followed by a possibly signed exponent. -.HP 5 -.B ( -expression -.B ) -.br -Parentheses are used to alter normal order of evaluation. -.HP 5 -_ expression -.br -The result is the negation of the expression. -.HP 5 -expression operator expression -.br -Common functions of two arguments are abbreviated -by the two arguments separated by an operator denoting the function. -A complete list of operators is given below. -.HP 5 -expression -.B ( -[expression [ -.B , -expression] ... ] -.B ) -.br -Functions of an arbitrary number of arguments -can be called by an expression followed by the arguments -in parentheses separated by commas. -The expression evaluates to the -line number of the entry of the function in the -internally stored statements. -This causes the internal statements to be compiled. -If the expression evaluates negative, -a builtin function is called. -The list of builtin functions appears below. -.HP 5 -name -.B [ -expression -[ -.B , -expression -] ... -.B ] -.br -Each expression is truncated to an integer -and used as a specifier for the name. -The result is syntactically identical to a name. -.B a[1,2] -is the same as -.B a[1][2]. -The truncated expressions are restricted to -values between 0 and 32767. -.PP -The following is the list of operators: -.TP -= -= -is the assignment operator. -The left operand must be a name or an array element. -The result is the right operand. -Assignment binds right to left, -.TP -& | -& -(logical and) -has result zero if either of its arguments are zero. -It has result one if both its arguments are non-zero. -| -(logical or) -has result zero if both of its arguments are zero. -It has result one if either of its arguments are non-zero. -.TP -< <= > >= == <> -The relational operators -(< less than, <= less than or equal, -> greater than, ->= greater than or equal, -== equal to, -<> not equal to) -return one if their arguments are in the specified -relation. -They return zero otherwise. -Relational operators at the same level extend as follows: -a>b>c is the same as a>b&b>c. -.TP -+ \- -Add and subtract. -.TP -* / -Multiply and divide. -.TP -^ -Exponentiation. -.PP -The following is a list of builtin functions: -.TP 7 -.B arg(i) -is the value of the -.IR i " -th" -actual parameter on the current level -of function call. -.TP 7 -.B exp(x) -is the exponential function of -.IR x . -.TP 7 -.B log(x) -is the natural logarithm of -.IR x . -.TP 7 -.B sqr(x) -is the square root of -.IR x . -.TP 7 -.B sin(x) -is the sine of -.IR x "" -(radians). -.TP 7 -.B cos(x) -is the cosine of -.IR x "" -(radians). -.TP 7 -.B atn(x) -is the arctangent of -.IR x . -Its value -is between \-\(*p/2 and \(*p/2. -.TP 7 -.B "rnd( )" -is a uniformly distributed random -number between zero and one. -.TP 7 -.B "expr( )" -is the only form of program input. -A line is read from the input and -evaluated as an expression. -The resultant value is returned. -.TP 7 -.B abs(x) -is the absolute value of -.IR x . -.TP 7 -.B int(x) -returns -.I x -truncated (towards 0) to an integer. -.SH FILES -/tmp/btm? temporary -.br -b.out save file -.br -/bin/ed for -.B edit -.SH DIAGNOSTICS -Syntax -errors cause the incorrect line to be typed -with an underscore where the parse failed. -All other diagnostics are self explanatory. -.SH BUGS -Has been known to give core images. -.br -Catches interrupts even when they are turned off. //GO.SYSIN DD bas.1 echo basename.1 sed 's/.//' >basename.1 <<'//GO.SYSIN DD basename.1' -.TH BASENAME 1 -.SH NAME -basename \- strip filename affixes -.SH SYNOPSIS -.B basename -string [ suffix ] -.SH DESCRIPTION -.I Basename -deletes any prefix ending in `/' and the -.I suffix, -if present in -.I string, -from -.I string, -and prints the result on the standard output. -It is normally used inside substitution marks \`\ \` -in shell procedures. -.PP -This shell procedure invoked with the argument -.I /usr/src/cmd/cat.c -compiles the named file and moves the output to -.I cat -in the current directory: -.IP "" 15n -cc $1 -.br -mv a.out \`basename $1 .c\` -.SH "SEE ALSO" -sh(1) //GO.SYSIN DD basename.1 echo bc.1 sed 's/.//' >bc.1 <<'//GO.SYSIN DD bc.1' -.TH BC 1 -.SH NAME -bc \- arbitrary-precision arithmetic language -.SH SYNOPSIS -.B bc -[ -.B \-c -] [ -.B \-l -] [ file ... ] -.SH DESCRIPTION -.I Bc -is an interactive processor for a language which resembles -C but provides unlimited precision arithmetic. -It takes input from any files given, then reads -the standard input. -The -.B \-l -argument stands for the name -of an arbitrary precision math library. -The syntax for -.I bc -programs is as follows; -L means letter a-z, -E means expression, S means statement. -.HP 6 -Comments -.br -are enclosed in /* and */. -.HP 6 -Names -.br -simple variables: L -.br -array elements: L [ E ] -.br -The words `ibase', `obase', and `scale' -.HP 6 -Other operands -.br -arbitrarily long numbers with optional sign and decimal point. -.br -( E ) -.br -sqrt ( E ) -.br -length ( E ) number of significant decimal digits -.br -scale ( E ) number of digits right of decimal point -.br -L ( E , ... , E ) -.HP 6 -Operators -.br -+ \- * / % ^ -(% is remainder; ^ is power) -.br -++ \-\- (prefix and postfix; apply to names) -.br -== <= >= != < > -.br -= =+ =\- =* =/ =% =^ -.br -.HP 6 -Statements -.br -E -.br -{ S ; ... ; S } -.br -if ( E ) S -.br -while ( E ) S -.br -for ( E ; E ; E ) S -.br -null statement -.br -break -.br -quit -.HP 6 -Function definitions -.br -define L ( L ,..., L ) { -.br - auto L, ... , L -.br - S; ... S -.br - return ( E ) -.br -} -.HP 6 -Functions in -.B \-l -math library -.br -s(x) sine -.br -c(x) cosine -.br -e(x) exponential -.br -l(x) log -.br -a(x) arctangent -.br -j(n,x) Bessel function -.PP -.DT -All function arguments are passed by value. -.PP -The value of a statement that is an expression is printed -unless the main operator is an assignment. -Either semicolons or newlines may separate statements. -Assignment to -.I scale -influences the number of digits to be retained on arithmetic -operations in the manner of -.IR dc (1). -Assignments to -.I ibase -or -.I obase -set the input and output number radix respectively. -.PP -The same letter may be used as an array, a function, -and a simple variable simultaneously. -All variables are global to the program. -`Auto' variables are pushed down during function calls. -When using arrays as function arguments -or defining them as automatic variables -empty square brackets must follow the array name. -.PP -For example -.PP -.nf -scale = 20 -define e(x){ - auto a, b, c, i, s - a = 1 - b = 1 - s = 1 - for(i=1; 1==1; i++){ - a = a*x - b = b*i - c = a/b - if(c == 0) return(s) - s = s+c - } -} -.PP -.fi -defines a function to compute an approximate value of -the exponential function and -.PP -.nf - for(i=1; i<=10; i++) e(i) -.fi -.PP -prints approximate values of the exponential function of -the first ten integers. -.PP -.I Bc -is actually a preprocessor for -.IR dc (1), -which it invokes automatically, unless the -.B \-c -(compile only) -option is present. -In this case the -.I dc -input is sent to the standard output instead. -.SH FILES -.ta \w'/usr/lib/lib.b 'u -/usr/lib/lib.b mathematical library -.br -dc(1) desk calculator proper -.SH "SEE ALSO" -dc(1) -.br -L. L. Cherry and R. Morris, -.I -BC \- An arbitrary precision desk-calculator language -.SH BUGS -No &&, \(or\|\(or, or ! operators. -.br -.I For -statement must have all three E's. -.br -.I Quit -is interpreted when read, not when executed. //GO.SYSIN DD bc.1 echo cal.1 sed 's/.//' >cal.1 <<'//GO.SYSIN DD cal.1' -.TH CAL 1 -.SH NAME -cal \- print calendar -.SH SYNOPSIS -.B cal -[ month ] year -.SH DESCRIPTION -.I Cal -prints a calendar for the specified year. -If a month is also specified, a calendar -just for that month is printed. -.I Year -can be between 1 -and 9999. -The -.I month -is a number between 1 and 12. -The calendar -produced is that for England and her colonies. -.PP -Try September 1752. -.SH BUGS -The year is always considered to start in January even though this -is historically naive. -.br -Beware that `cal 78' refers to the early Christian era, -not the 20th century. //GO.SYSIN DD cal.1 echo calendar.1 sed 's/.//' >calendar.1 <<'//GO.SYSIN DD calendar.1' -.TH CALENDAR 1 -.SH NAME -calendar \- reminder service -.SH SYNOPSIS -.B calendar -[ \- ] -.SH DESCRIPTION -.I Calendar -consults the file `calendar' in the current directory -and prints out lines that contain today's or -tomorrow's date anywhere in the line. -Most reasonable month-day dates such as `Dec. 7,' -`december 7,' `12/7,' etc., are recognized, but not -`7 December' or `7/12'. -On weekends `tomorrow' extends through Monday. -.PP -When -an argument is present, -.I calendar -does its job for every user -who has a file `calendar' in his login directory -and sends him any positive results by -.IR mail (1). -Normally this is done daily in the wee hours under control of -.IR cron (8). -.SH FILES -calendar -.br -/usr/lib/calendar to figure out today's and tomorrow's dates -.br -/etc/passwd -.br -/tmp/cal* -.br -egrep, sed, mail subprocesses -.SH "SEE ALSO" -at(1), cron(8), mail(1) -.SH BUGS -Your calendar must be public information for you -to get reminder service. -.br -.I Calendar's -extended idea of `tomorrow' doesn't account for -holidays. //GO.SYSIN DD calendar.1 echo cat.1 sed 's/.//' >cat.1 <<'//GO.SYSIN DD cat.1' -.TH CAT 1 -.SH NAME -cat \- catenate and print -.SH SYNOPSIS -.B cat -[ -.B \-u -] file ... -.SH DESCRIPTION -.I Cat -reads each -.I file -in sequence and writes it on the standard output. -Thus -.IP -cat file -.LP -prints the file and -.IP -cat file1 file2 >file3 -.LP -concatenates the first two files and places the result -on the third. -.PP -If no -.I file -is given, or if the argument `\-' is encountered, -.I cat -reads from the standard input. -Output is buffered in 512-byte blocks unless the -standard output is a terminal or the -.B \-u -option is present. -.SH SEE ALSO -pr(1), cp(1) -.SH BUGS -Beware of `cat a b >a' and `cat a b >b', which -destroy input files before reading them. //GO.SYSIN DD cat.1 echo cb.1 sed 's/.//' >cb.1 <<'//GO.SYSIN DD cb.1' -.TH CB 1 -.SH NAME -cb \- C program beautifier -.SH SYNOPSIS -.B cb -.SH DESCRIPTION -.I Cb -places a copy of the C program from the standard input -on the standard output with spacing and indentation -that displays the structure of the program. -.SH BUGS //GO.SYSIN DD cb.1 echo cc.1 sed 's/.//' >cc.1 <<'//GO.SYSIN DD cc.1' -.TH CC 1 PDP11 -.SH NAME -cc, pcc \- C compiler -.SH SYNOPSIS -.B cc -[ option ] ... file ... -.PP -.B pcc -[ option ] ... file ... -.SH DESCRIPTION -.I Cc -is the UNIX C compiler. -It accepts several types of arguments: -.PP -Arguments whose names end with `.c' are taken to be -C source programs; they are compiled, and -each object program is left on the file -whose name is that of the source with `.o' substituted -for `.c'. -The `.o' file is normally deleted, however, if a single -C program is compiled and loaded all at one go. -.PP -In the same way, -arguments whose names end with `.s' are taken to be assembly source programs -and are assembled, producing a `.o' file. -.PP -The following options are interpreted by -.IR cc . -See -.IR ld (1) -for load-time options. -.TP 8 -.B \-c -Suppress the loading phase of the compilation, and force -an object file to be produced even if only one program is compiled. -.TP -.B \-p -Arrange for the compiler to produce code -which counts the number of times each routine is called; -also, if loading takes place, replace the standard startup -routine by one which automatically calls -.IR monitor (3) -at the start and arranges to write out a -.I mon.out -file at normal termination of execution of the object program. -An execution profile can then be generated by -use of -.IR prof (1). -.TP -.B \-f -In systems without hardware floating-point, -use a version of the C compiler which handles floating-point -constants and -loads the object program with the floating-point interpreter. -Do not use if the hardware is present. -.TP -.SM -.B \-O -Invoke an -object-code optimizer. -.TP -.SM -.B \-S -Compile the named C programs, and leave the -assembler-language output on corresponding files suffixed `.s'. -.TP -.SM -.B \-P -Run only the macro preprocessor and place the result for -each `.c' file in a corresponding `.i' file -and has no `#' lines in it. -.TP -.SM -.B \-E -Run only the macro preprocessor -and send the result to the -standard output. -The output is intended for compiler debugging; it -is unacceptable as input to -.IR cc . -.TP -.BI \-o " output" -Name the final output file -.IR output . -If this option is used the file `a.out' will be left undisturbed. -.TP -.BI \-D name=def -.br -.ns -.TP -.SM -.BI \-D \*Sname -Define the -.I name -to the preprocessor, -as if by -`#define'. -If no definition is given, the name is defined as 1. -.TP -.SM -.BI \-U \*Sname -Remove any initial definition of -.IR name . -.TP -.SM -.BI \-I \*Sdir -`#include' files -whose names do not begin with `/' are always -sought first in the directory -of the -.I file -argument, -then in directories named in -.B \-I -options, -then in directories on a standard list. -.TP -.SM -.BI \-B \*Sstring -Find substitute compiler passes in the files named -.I string -with the suffixes cpp, c0, c1 and c2. -If -.I string -is empty, use a standard backup version. -.TP -.BR \-t [ p012 ] -Find only the designated compiler passes in the -files whose names are constructed by a -.B \-B -option. -In the absence of a -.B \-B -option, the -.I string -is taken to be `/usr/c/'. -.PP -Other arguments -are taken -to be either loader option arguments, or C-compatible -object programs, typically produced by an earlier -.I cc -run, -or perhaps libraries of C-compatible routines. -These programs, together with the results of any -compilations specified, are loaded (in the order -given) to produce an executable program with name -.B a.out. -.PP -The major purpose of the `portable C compiler', -.I pcc, -is to serve as a model -on which to base other compilers. -.I Pcc -does not support options -.BR \-f , -.BR \-E , -.BR \-B , -and -.BR \-t . -It provides, in addition to the language of -.I cc, -unsigned char type data and initialized bit fields. -.SH FILES -.ta \w'/usr/c/oc[102] 'u -file.c input file -.br -file.o object file -.br -a.out loaded output -.br -/tmp/ctm? temporaries for -.I cc -.br -/lib/cpp preprocessor -.br -/lib/c[01] compiler for -.I cc -.br -/usr/c/oc[012] backup compiler for -.I cc -.br -/usr/c/ocpp backup preprocessor -.br -/lib/fc[01] floating-point compiler -.br -/lib/c2 optional optimizer -.br -/lib/crt0.o runtime startoff -.br -/lib/mcrt0.o startoff for profiling -.br -/lib/fcrt0.o startoff for floating-point interpretation -.br -/lib/libc.a standard library, see -.IR intro (3) -.br -/usr/include standard directory for `#include' files -.br -/tmp/pc* temporaries for -.I pcc -.br -/usr/lib/ccom compiler for -.I pcc -.SH "SEE ALSO" -B. W. Kernighan and D. M. Ritchie, -.I The C Programming Language, -Prentice-Hall, -1978 -.br -D. M. Ritchie, -.I -C Reference Manual -.br -monitor(3), prof(1), adb(1), ld(1) -.SH DIAGNOSTICS -The diagnostics produced by C itself are intended to be -self-explanatory. -Occasional messages may be produced by the assembler -or loader. -Of these, the most mystifying are from the assembler, -.IR as (1), -in particular `m', which means -a multiply-defined external symbol (function -or data). -.SH BUGS -.I Pcc -is little tried on the PDP11; specialized -code generated for that machine has not been -well shaken down. -The -.B \-O -optimizer was designed to work with -.IR cc ; -its use with -.I pcc -is suspect. //GO.SYSIN DD cc.1 echo cd.1 sed 's/.//' >cd.1 <<'//GO.SYSIN DD cd.1' -.TH CD 1 -.SH NAME -cd \- change working directory -.SH SYNOPSIS -.B cd -directory -.SH DESCRIPTION -.I Directory -becomes the new working directory. -The process must have execute (search) -permission in -.IR directory . -.PP -Because a new process is created to execute each command, -.I cd -would be ineffective if it were written as a -normal command. It is therefore recognized and executed -by the Shell. -.SH "SEE ALSO" -sh(1), pwd(1), chdir(2) //GO.SYSIN DD cd.1 echo chmod.1 sed 's/.//' >chmod.1 <<'//GO.SYSIN DD chmod.1' -.TH CHMOD 1 -.SH NAME -chmod \- change mode -.SH SYNOPSIS -.B chmod -mode file ... -.SH DESCRIPTION -The mode of -each named file -is changed -according to -.I mode, -which may be absolute or symbolic. -An absolute -.I mode -is an octal -number constructed -from the OR of the -following modes: -.TP 10 -4000 -set user ID on execution -.br -.br -.ns -.TP 10 -2000 -set group ID on execution -.br -.br -.ns -.TP 10 -1000 -sticky bit, see -.IR chmod (2) -.br -.br -.ns -.TP 10 -0400 -read by owner -.br -.br -.ns -.TP 10 -0200 -write by owner -.br -.br -.ns -.TP 10 -0100 -execute (search in directory) by owner -.br -.br -.ns -.TP 10 -0070 -read, write, execute (search) by group -.br -.br -.ns -.TP 10 -0007 -read, write, execute (search) by others -.PP -A symbolic -.I mode -has the form: -.IP -.RI [ who ] -.I op permission -.RI [ "op permission" "] ..." -.PP -The -.I who -part is a combination -of the letters -.B u -(for user's permissions), -.B g -(group) -and -.B o -(other). -The letter -.B a -stands for -.B ugo. -If -.I who -is omitted, -the default is -.I a -but the setting of -the file creation mask -(see umask(2)) -is taken into account. -.PP -.I Op -can be -.B + -to add -.I permission -to the file's mode, -.B \- -to take away -.I permission -and -.B = -to assign -.I permission -absolutely -(all other bits will -be reset). -.PP -.I Permission -is any combination of the letters -.B r -(read), -.B w -(write), -.B x -(execute), -.B s -(set owner or group id) -and -.B t -(save text \- sticky). -Letters -.BR u, -.B g -or -.B o -indicate that -.I permission -is to be taken -from the current -mode. -Omitting -.I permission -is only useful -with -.B = -to take away -all permissions. -.PP -The first example denies write permission to others, -the second makes a file executable: -.IP -chmod o\-w file -.br -chmod +x file -.PP -Multiple symbolic modes separated by commas may be given. -Operations are performed -in the order specified. -The letter -.B s -is only useful -with -.B u -or -.B g. -.PP -Only the owner of a file (or the super-user) may change its mode. -.SH "SEE ALSO" -ls(1), -chmod(2), -chown (1), -stat(2), -umask(2) //GO.SYSIN DD chmod.1 echo chown.1 sed 's/.//' >chown.1 <<'//GO.SYSIN DD chown.1' -.TH CHOWN 1 -.SH NAME -chown, chgrp \- change owner or group -.SH SYNOPSIS -.B chown -owner file ... -.PP -.B chgrp -group file ... -.SH DESCRIPTION -.I Chown -changes the owner of the -.I files -to -.IR owner . -The owner may be either a decimal UID or -a login name found in the password file. -.PP -.I Chgrp -changes the group-ID of the -.I files -to -.IR group . -The group may be either a decimal GID or -a group name found in the group-ID file. -.PP -Only the super-user can change owner or group, -in order to simplify as yet unimplemented accounting procedures. -.SH FILES -/etc/passwd -.br -/etc/group -.SH "SEE ALSO" -chown(2), -passwd(5), group(5) //GO.SYSIN DD chown.1 echo clri.1m sed 's/.//' >clri.1m <<'//GO.SYSIN DD clri.1m' -.TH CLRI 1M -.SH NAME -clri \- clear i-node -.SH SYNOPSIS -.B clri -filesystem i-number ... -.SH DESCRIPTION -.I Clri -writes zeros on the i-nodes -with the decimal -.I i-numbers -on the -.I filesystem. -After -.I clri, -any blocks -in the affected file -will show up as `missing' in an -.IR icheck (1) -of the -.I filesystem. -.PP -Read and write permission is required on the specified -file system device. -The i-node becomes allocatable. -.PP -The primary purpose of this routine -is to remove a file which -for some reason appears in no -directory. -If it is used to zap an i-node -which does appear in a directory, care should be taken to track down -the entry and remove it. -Otherwise, when the i-node is reallocated to some new file, -the old entry will still point to that file. -At that point removing the old entry will destroy the new file. -The new entry will again point to an unallocated i-node, -so the whole cycle is likely to be repeated again and again. -.SH "SEE ALSO" -icheck(1) -.SH BUGS -If the file is open, -.I clri -is likely to be ineffective. //GO.SYSIN DD clri.1m echo cmp.1 sed 's/.//' >cmp.1 <<'//GO.SYSIN DD cmp.1' -.TH CMP 1 -.SH NAME -cmp \- compare two files -.SH SYNOPSIS -.B cmp -[ -.B \-l -] [ -.B \-s -] -file1 file2 -.SH DESCRIPTION -The two files are -compared. -(If -.I file1 -is `\-', -the standard input is used.) -Under default options, -.I cmp -makes no comment if the files are the same; -if they differ, it announces the byte and line number -at which the difference occurred. -If one file is an initial subsequence -of the other, that fact is noted. -.PP -Options: -.TP 6 -.B \-l -Print the byte number (decimal) and the -differing bytes (octal) for each difference. -.TP 6 -.B \-s -Print nothing for differing files; -return codes only. -.dt -.SH "SEE ALSO" -diff(1), comm(1) -.SH DIAGNOSTICS -Exit code 0 is returned for identical -files, 1 for different files, and 2 for an -inaccessible or missing argument. //GO.SYSIN DD cmp.1 echo col.1 sed 's/.//' >col.1 <<'//GO.SYSIN DD col.1' -.TH COL 1 -.SH NAME -col \- filter reverse line feeds -.SH SYNOPSIS -.B col [\|\-bfx\|] -.SH DESCRIPTION -.I Col -reads the standard input and writes the standard output. -It performs the line overlays implied by reverse line -feeds (ESC-7 in ASCII) -and by forward and reverse half line feeds (ESC-9 and ESC-8). -.I Col -is particularly useful for filtering multicolumn -output made with the `.rt' command of -.I nroff -and output resulting from use of the -.IR tbl (1) -preprocessor. -.PP -Although -.I col -accepts half line motions in its input, it normally does not -emit them on output. -Instead, text that would appear between lines is moved to the next lower -full line boundary. -This treatment can be suppressed by the -.B \-f -(fine) option; in this case -the output from -.I col -may contain forward half line feeds (ESC-9), but will still never contain -either kind of reverse line motion. -.PP -If the -.B \-b -option is given, -.I col -assumes that the output device in use is not capable of backspacing. -In this case, if several characters are to appear in the same place, -only the last one read will be taken. -.PP -The control characters SO (ASCII code 017), -and SI (016) are assumed -to start and end text in an alternate character set. -The character set (primary or alternate) associated with each printing -character read is remembered; on output, SO and SI characters are generated -where necessary to maintain the correct treatment of each character. -.PP -.I Col -normally converts white space to tabs to shorten printing time. -If the -.B \-x -option is given, this conversion is suppressed. -.PP -All control characters are removed from the input except space, -backspace, -tab, return, newline, ESC (033) followed by one of 789, SI, SO, and VT -(013). -This last character is an alternate form of full reverse line feed, for -compatibility with some other hardware conventions. -All other non-printing characters are ignored. -.SH "SEE ALSO" -troff(1), tbl(1), greek(1) -.SH BUGS -Can't back up more than 128 lines. -.br -No more than 800 characters, including backspaces, on a line. //GO.SYSIN DD col.1 echo comm.1 sed 's/.//' >comm.1 <<'//GO.SYSIN DD comm.1' -.TH COMM 1 -.SH NAME -comm \- select or reject lines common to two sorted files -.SH SYNOPSIS -.B comm -[ -.B \- -[ -.B 123 -] -] file1 file2 -.SH DESCRIPTION -.I Comm -reads -.I file1 -and -.I file2, -which should be ordered in ASCII collating sequence, -and produces a three column output: lines only in -.I file1; -lines only in -.I file2; -and lines in both files. -The filename `\-' means the standard input. -.PP -Flags 1, 2, or 3 suppress printing of the corresponding -column. -Thus -.B comm -.B \-12 -prints only the lines common to the two files; -.B comm -.B \-23 -prints only lines in the first file but not in the second; -.B comm -.B \-123 -is a no-op. -.PP -.SH "SEE ALSO" -cmp(1), diff(1), uniq(1) //GO.SYSIN DD comm.1 echo cp.1 sed 's/.//' >cp.1 <<'//GO.SYSIN DD cp.1' -.TH CP 1 -.SH NAME -cp \- copy -.SH SYNOPSIS -.B cp -file1 file2 -.PP -.B cp -file ... directory -.SH DESCRIPTION -.I File1 -is copied onto -.IR file2 . -The mode and owner of -.I file2 -are preserved if it already -existed; the mode of the source file -is used otherwise. -.PP -In the second form, one or more -.I files -are copied into the -.I directory -with their original file-names. -.PP -.I Cp -refuses to copy a file onto itself. -.SH "SEE ALSO" -cat(1), pr(1), mv(1) //GO.SYSIN DD cp.1 echo crypt.1 sed 's/.//' >crypt.1 <<'//GO.SYSIN DD crypt.1' -.TH CRYPT 1 -.SH NAME -crypt \- encode/decode -.SH SYNOPSIS -.B crypt -[ password ] -.SH DESCRIPTION -.I Crypt -reads from the standard input and writes -on the standard output. -The -.I password -is a key that selects a particular transformation. -If no -.I password -is given, -.I crypt -demands a key from the terminal and turns -off printing while the key is being typed in. -.I Crypt -encrypts and decrypts with the same key: -.PP - crypt key cypher -.br - crypt key cu.1c <<'//GO.SYSIN DD cu.1c' -.TH CU 1C -.SH NAME -cu \- call UNIX -.SH SYNOPSIS -.B cu -telno -[ -.BR \-t "" -] -[ -.BR \-s "" -speed ] -[ -.BR \-a "" -acu ] -[ -.BR \-l "" -line ] -.SH DESCRIPTION -.I Cu -calls up another UNIX system, -a terminal, -or possibly a non-UNIX system. -It manages an interactive conversation with possible -transfers of text files. -.I Telno -is the telephone number, -with minus signs at appropriate places for delays. -The -.BR \-t "" -flag is used to dial out to a terminal. -.I Speed -gives the transmission speed (110, 134, 150, 300, 1200); -300 is the default value. -.PP -The -.BR \-a "" -and -.BR \-l "" -values may be used to -specify pathnames -for the ACU and communications line devices. -They can be used to override the following -built-in choices: -.PP -.BR \-a " /dev/cua0" -.BR \-l " /dev/cul0" -.PP -After making the connection, -.I cu -runs as two processes: -the -.I send -process reads the standard input and -passes most of it to the remote system; -the -.I receive -process reads from the remote system and passes -most data to the standard output. -Lines beginning with `~' have special meanings. -.PP -The -.I send -process interprets the following: -.TP 18 -~\|\fB.\| -terminate the conversation. -.br -.ns -.TP 18 -~EOT -terminate the conversation -.TP 18 -~[>][:]file -.br -zero or more lines to be written to file -.br -\&~> -.PP -In any case, output is diverted (or appended, if `>>' used) to the file. -If `:' is used, -the diversion is -.I silent, -i.e., it is written only to the file. -If `:' is omitted, -output is written both to the file and to the standard output. -The trailing `~>' terminates the diversion. -.PP -The use of -.B ~%put -requires -.I stty -and -.I cat -on the remote side. -It also requires that the -current erase and kill characters on the remote -system be identical to the current ones on the local system. -Backslashes are inserted at appropriate places. -.PP -The use of -.B ~%take -requires the existence of -.I echo -and -.I tee -on the remote system. -Also, -.B "stty tabs" -mode is required on the remote system if -tabs are to be copied without expansion. -.SH FILES -/dev/cua0 -.br -/dev/cul0 -.br -/dev/null -.SH "SEE ALSO" -dn(4), tty(4) -.SH DIAGNOSTICS -Exit code is -zero for normal exit, -nonzero (various values) otherwise. -.SH BUGS -The syntax is unique. //GO.SYSIN DD cu.1c echo date.1 sed 's/.//' >date.1 <<'//GO.SYSIN DD date.1' -.TH DATE 1 -.SH NAME -date \- print and set the date -.SH SYNOPSIS -.B date -.RB "[ yymmddhhmm [ " . "ss ] ]" -.SH DESCRIPTION -If no argument is given, the current date and time are printed. -If an argument is given, the current date is set. -.I yy -is the last two digits of the year; -the first -.I mm -is the month number; -.I dd -is the day number in the month; -.I hh -is the hour number (24 hour system); -the second -.I mm -is the minute number; -.BI . ss -is optional and is the seconds. -For example: -.IP -date 10080045 -.PP -sets the date to Oct 8, 12:45 AM. -The year, month and day may be omitted, the current -values being the defaults. -The system operates in GMT. -.I Date -takes care of the conversion to and from -local standard and daylight time. -.SH FILES -/usr/adm/wtmp to record time-setting -.SH SEE ALSO -utmp(5) -.SH DIAGNOSTICS -`No permission' if -you aren't the super-user and you try to change the date; -`bad conversion' if the date set is syntactically incorrect. //GO.SYSIN DD date.1 echo dc.1 sed 's/.//' >dc.1 <<'//GO.SYSIN DD dc.1' -.TH DC 1 -.SH NAME -dc \- desk calculator -.SH SYNOPSIS -.B dc -[ file ] -.SH DESCRIPTION -.I Dc -is an arbitrary precision arithmetic package. -Ordinarily it operates on decimal integers, -but one may specify an input base, output base, -and a number of fractional digits to be maintained. -The overall structure of -.I dc -is -a stacking (reverse Polish) calculator. -If an argument is given, -input is taken from that file until its end, -then from the standard input. -The following constructions are recognized: -.HP 6 -number -.br -The value of the number is pushed on the stack. -A number is an unbroken string of the digits 0-9. -It may be preceded by an underscore _ to input a -negative number. -Numbers may contain decimal points. -.HP 6 -+ \- / * % ^ -.br -The -top two values on the stack are added -(+), -subtracted -(\-), -multiplied (*), -divided (/), -remaindered (%), -or exponentiated (^). -The two entries are popped off the stack; -the result is pushed on the stack in their place. -Any fractional part of an exponent is ignored. -.TP -.BI s x -The -top of the stack is popped and stored into -a register named -.I x, -where -.I x -may be any character. -If -the -.B s -is capitalized, -.I x -is treated as a stack and the value is pushed on it. -.TP -.BI l x -The -value in register -.I x -is pushed on the stack. -The register -.I x -is not altered. -All registers start with zero value. -If the -.B l -is capitalized, -register -.I x -is treated as a stack and its top value is popped onto the main stack. -.TP -.B d -The -top value on the stack is duplicated. -.TP -.B p -The top value on the stack is printed. -The top value remains unchanged. -.B P -interprets the top of the stack as an ascii string, -removes it, and prints it. -.TP -.B f -All values on the stack and in registers are printed. -.TP -.B q -exits the program. -If executing a string, the recursion level is -popped by two. -If -.B q -is capitalized, -the top value on the stack is popped and the string execution level is popped -by that value. -.TP -.B x -treats the top element of the stack as a character string -and executes it as a string of dc commands. -.TP -.B X -replaces the number on the top of the stack with its scale factor. -.TP -.B "[ ... ]" -puts the bracketed ascii string onto the top of the stack. -.HP 6 -.I "x =x" -.br -The -top two elements of the stack are popped and compared. -Register -.I x -is executed if they obey the stated -relation. -.TP -.B v -replaces the top element on the stack by its square root. -Any existing fractional part of the argument is taken -into account, but otherwise the scale factor is ignored. -.TP -.B ! -interprets the rest of the line as a UNIX command. -.TP -.B c -All values on the stack are popped. -.TP -.B i -The top value on the stack is popped and used as the -number radix for further input. -.B I -pushes the input base on the top of the stack. -.TP -.B o -The top value on the stack is popped and used as the -number radix for further output. -.TP -.SM -.B O -pushes the output base on the top of the stack. -.TP -.B k -the top of the stack is popped, and that value is used as -a non-negative scale factor: -the appropriate number of places -are printed on output, -and maintained during multiplication, division, and exponentiation. -The interaction of scale factor, -input base, and output base will be reasonable if all are changed -together. -.TP -.B z -The stack level is pushed onto the stack. -.TP -.SM -.B Z -replaces the number on the top of the stack with its length. -.TP -.B ? -A line of input is taken from the input source (usually the terminal) -and executed. -.TP -.B "; :" -are used by -.I bc -for array operations. -.PP -An example which prints the first ten values of n! is -.nf -.PP -.in +3 -[la1+dsa*pla10>y]sy -.br -0sa1 -.br -lyx -.fi -.SH "SEE ALSO" -bc(1), -which is a preprocessor for -.I dc -providing infix notation and a C-like syntax -which implements functions and reasonable control -structures for programs. -.SH DIAGNOSTICS -`x is unimplemented' where x is an octal number. -.br -`stack empty' for not enough elements on the stack to do what was asked. -.br -`Out of space' when the free list is exhausted (too many digits). -.br -`Out of headers' for too many numbers being kept around. -.br -`Out of pushdown' for too many items on the stack. -.br -`Nesting Depth' for too many levels of nested execution. //GO.SYSIN DD dc.1 echo dcheck.1m sed 's/.//' >dcheck.1m <<'//GO.SYSIN DD dcheck.1m' -.TH DCHECK 1M -.SH NAME -dcheck \- file system directory consistency check -.SH SYNOPSIS -.B dcheck -[ -.B \-i -numbers ] -[ filesystem ] -.SH DESCRIPTION -.I Dcheck -reads the directories in a file system -and compares -the link-count in each i-node with the number of directory -entries by which it is referenced. -If the file system is not specified, -a set of default file systems -is checked. -.PP -The -.B \-i -flag -is followed by a list of i-numbers; -when one of those i-numbers turns up -in a directory, -the number, the i-number of the directory, -and the name of the entry are reported. -.PP -The program is fastest if the -raw version of the special file is used, -since the i-list is read in large chunks. -.SH FILES -Default file systems vary with installation. -.SH "SEE ALSO" -icheck(1), filsys(5), clri(1), ncheck(1) -.SH DIAGNOSTICS -When a file turns up for which the link-count and the number -of directory entries disagree, -the relevant facts are reported. -Allocated files which have 0 link-count and no entries are also -listed. -The only dangerous situation -occurs when there are more entries than links; -if entries are removed, -so the link-count drops to 0, -the remaining entries point to thin air. -They should be removed. -When there are more links than entries, or there is -an allocated file with neither links nor entries, -some disk space may be lost but the situation will not degenerate. -.SH BUGS -Since -.I dcheck -is inherently two-pass in nature, extraneous diagnostics -may be produced if applied to active file systems. //GO.SYSIN DD dcheck.1m echo dd.1 sed 's/.//' >dd.1 <<'//GO.SYSIN DD dd.1' -.TH DD 1 -.SH NAME -dd \- convert and copy a file -.SH SYNOPSIS -.B dd -[option=value] ... -.SH DESCRIPTION -.I Dd -copies the specified input file -to the specified output with -possible conversions. -The standard input and output are used by default. -The input and output block size may be -specified to take advantage of raw physical I/O. -.PP -.br -.ns -.TP 15 -.I option -.I values -.br -.ns -.TP -if= -input file name; standard input is default -.br -.ns -.TP -of= -output file name; standard output is default -.br -.ns -.TP -.RI ibs= n -input block size -.I n -bytes (default 512) -.br -.ns -.TP -.RI obs= n -output block size (default 512) -.br -.ns -.TP -.RI bs= n -set both input and output block size, -superseding -.I ibs -and -.I obs; -also, if no conversion is specified, -it is particularly efficient since no copy need be done -.br -.ns -.TP -.RI cbs= n -conversion buffer size -.br -.ns -.TP -.RI skip= n -skip -.IR n "" -input records before starting copy -.br -.ns -.TP -.RI files= n -copy -.I n -files from (tape) input -.br -.ns -.TP -.RI seek= n -seek -.I n -records from beginning of output file before copying -.br -.ns -.TP -count=\fIn\fR -copy only -.IR n "" -input records -.br -.ns -.TP -conv=ascii -.ds h \h'\w'conv='u' -convert EBCDIC to ASCII -.br -.ns -.IP \*hebcdic -convert ASCII to EBCDIC -.br -.ns -.IP \*hibm -slightly different map of ASCII to EBCDIC -.br -.ns -.IP \*hlcase -map alphabetics to lower case -.br -.ns -.IP \*hucase -map alphabetics to upper case -.br -.ns -.IP \*hswab -swap every pair of bytes -.br -.ns -.IP \*hnoerror -do not stop processing on an error -.br -.ns -.IP \*hsync -pad every input record to -.I ibs -.br -.ns -.IP "\*h... , ..." -several comma-separated conversions -.PP -.fi -Where sizes are specified, -a number of bytes is expected. -A number may end with -.B "k, b" -or -.B w -to specify multiplication by -1024, 512, or 2 respectively; -a pair of numbers may be separated by -.B x -to indicate a product. -.PP -.I Cbs -is used only if -.I ascii -or -.I ebcdic -conversion is specified. -In the former case -.I cbs -characters are placed into the conversion buffer, converted to -ASCII, and trailing blanks trimmed and new-line added -before sending the line to the output. -In the latter case ASCII characters are read into the -conversion buffer, converted to EBCDIC, and blanks added -to make up an -output record of size -.IR cbs . -.PP -After completion, -.I dd -reports the number of whole and partial input and output -blocks. -.PP -For example, to read an EBCDIC tape blocked ten 80-byte -EBCDIC card images per record into the ASCII file -.IR x : -.IP "" -dd if=/dev/rmt0 of=x ibs=800 cbs=80 conv=ascii,lcase -.PP -Note the use of raw magtape. -.I Dd -is especially suited to I/O on the raw -physical devices because it allows reading -and writing in arbitrary record sizes. -.PP -To skip over a file before copying from magnetic tape do -.IP"" -(dd of=/dev/null; dd of=x) deroff.1 <<'//GO.SYSIN DD deroff.1' -.TH DEROFF 1 -.SH NAME -deroff \- remove nroff, troff, tbl and eqn constructs -.SH SYNOPSIS -.B deroff -[ -.B \-w -] -file ... -.SH DESCRIPTION -.I Deroff -reads each file in sequence -and removes all -.I nroff -and -.I troff -command lines, backslash constructions, macro definitions, -.I eqn -constructs -(between `.EQ' and `.EN' lines or between -delimiters), -and table descriptions -and writes the remainder on the standard output. -.I Deroff -follows chains of included files -(`.so' and `.nx' commands); -if a file has already been included, a `.so' is ignored and a `.nx' terminates execution. -If no input file is given, -.I deroff -reads from the standard input file. -.PP -If the -.B \-w -flag is given, the output is a word list, one `word' (string of letters, digits, and apostrophes, -beginning with a letter; apostrophes are removed) per line, and all other characters ignored. -Otherwise, the output follows the original, with the deletions mentioned above. -.SH "SEE ALSO" -troff(1), eqn(1), tbl(1) -.SH BUGS -.I Deroff -is not a complete -.I troff -interpreter, -so it can be confused by subtle constructs. -Most errors result in too much rather than too little output. //GO.SYSIN DD deroff.1 echo df.1m sed 's/.//' >df.1m <<'//GO.SYSIN DD df.1m' -.TH DF 1M -.SH NAME -df \- disk free -.SH SYNOPSIS -.B df -[ filesystem ] ... -.SH DESCRIPTION -.I Df -prints out the number of free blocks -available on the -.I filesystems. -If no file system is specified, -the free space on all of -the normally mounted file systems -is printed. -.SH FILES -Default file systems vary with installation. -.SH "SEE ALSO" -icheck(1) //GO.SYSIN DD df.1m echo diff.1 sed 's/.//' >diff.1 <<'//GO.SYSIN DD diff.1' -.TH DIFF 1 -.SH NAME -diff \- differential file comparator -.SH SYNOPSIS -.B diff -[ -.B \-efbh -] file1 file2 -.SH DESCRIPTION -.I Diff -tells what lines must be changed in two files to bring them -into agreement. -If -.I file1 -.RI ( file2 ) -is `\-', the standard input is used. -If -.I file1 -.RI ( file2 ) -is a directory, then a file in that directory -whose file-name is the same as the file-name of -.I file2 -.RI ( file1 ) -is used. -The normal output contains lines of these forms: -.IP "" 5 -.I n1 -a -.I n3,n4 -.br -.I n1,n2 -d -.I n3 -.br -.I n1,n2 -c -.I n3,n4 -.PP -These lines resemble -.I ed -commands to convert -.I file1 -into -.IR file2 . -The numbers after the letters pertain to -.IR file2 . -In fact, by exchanging `a' for `d' and reading backward -one may ascertain equally how to convert -.I file2 -into -.IR file1 . -As in -.I ed, -identical pairs where -.I n1 -= -.I n2 -or -.I n3 -= -.I n4 -are abbreviated as a single number. -.PP -Following each of these lines come all the lines that are -affected in the first file flagged by `<', -then all the lines that are affected in the second file -flagged by `>'. -.PP -The -.B \-b -option causes -trailing blanks (spaces and tabs) to be ignored -and other strings of blanks to compare equal. -.PP -The -.B \-e -option produces a script of -.I "a, c" -and -.I d -commands for the editor -.I ed, -which will recreate -.I file2 -from -.IR file1 . -The -.B \-f -option produces a similar script, -not useful with -.I ed, -in the opposite order. -In connection with -.BR \-e , -the following shell program may help maintain -multiple versions of a file. -Only an ancestral file ($1) and a chain of -version-to-version -.I ed -scripts ($2,$3,...) made by -.I diff -need be on hand. -A `latest version' appears on -the standard output. -.IP "" 5 -(shift; cat $*; echo \'1,$p\') \(bv ed \- $1 -.PP -Except in rare circumstances, -.I diff -finds a smallest sufficient set of file -differences. -.PP -Option -.B \-h -does a fast, half-hearted job. -It works only when changed stretches are short -and well separated, -but does work on files of unlimited length. -Options -.B \-e -and -.B \-f -are unavailable with -.BR \-h . -.SH FILES -/tmp/d????? -.br -/usr/lib/diffh for -.B \-h -.SH "SEE ALSO" -cmp(1), comm(1), ed(1) -.SH DIAGNOSTICS -Exit status is 0 for no differences, 1 for some, 2 for trouble. -.SH BUGS -Editing scripts produced under the -.BR \-e " or" -.BR \-f " option are naive about" -creating lines consisting of a single `\fB.\fR'. //GO.SYSIN DD diff.1 echo diff3.1 sed 's/.//' >diff3.1 <<'//GO.SYSIN DD diff3.1' -.TH DIFF3 1 -.SH NAME -diff3 \- 3-way differential file comparison -.SH SYNOPSIS -.B diff3 -[ -.B \-ex3 -] -file1 file2 file3 -.SH DESCRIPTION -.I Diff3 -compares three versions of a file, -and publishes disagreeing ranges of text -flagged with these codes: -.TP 16 -==== -all three files differ -.TP 16 -====1 -.IR file1 " is different" -.TP 16 -====2 -.IR file2 " is different" -.TP 16 -====3 -.IR file3 " is different" -.PP -The type of change suffered in converting a given range -of a given file to some other is -indicated in one of these ways: -.TP 16 -.IB f " : " n1 " a" -Text is to be appended after line number -.I n1 -in file -.I f, -where -.I f -= 1, 2, or 3. -.TP 16 -.IB f " : " n1 " , " n2 " c" -Text is to be -changed in the range line -.I n1 -to line -.IR n2 . -If -.I n1 -= -.I n2, -the range may be abbreviated to -.IR n1 . -.PP -The original contents of the range follows immediately -after a -.B c -indication. -When the contents of two -files are identical, the contents of the lower-numbered -file is suppressed. -.PP -Under the -.B \-e -option, -.I diff3 -publishes a script for the editor -.I ed -that will incorporate into -.I file1 -all changes between -.I file2 -and -.I file3, -.IR i.e . -the changes that normally would be flagged ==== and ====3. -Option -.B \-x -(\fB\-3\fR) -produces a script to incorporate -only changes flagged ==== (====3). -The following command will apply the resulting script to -`file1'. -.PP -.ti 16n -(cat script; echo \'1,$p\') \(bv ed \- file1 -.SH FILES -/tmp/d3????? -.br -/usr/lib/diff3 -.SH "SEE ALSO" -diff(1) -.SH BUGS -Text lines that consist of a single `.' will -defeat -.B \-e. -.br -Files longer than 64K bytes won't work. //GO.SYSIN DD diff3.1 echo du.1 sed 's/.//' >du.1 <<'//GO.SYSIN DD du.1' -.TH DU 1 -.SH NAME -du \- summarize disk usage -.SH SYNOPSIS -.B du -[ -.B \-s -] [ -.B \-a -] [ name ... ] -.SH DESCRIPTION -.I Du -gives the number of blocks contained in all files -and (recursively) directories within each specified directory or -file -.IR name . -If -.I name -is missing, -`\fB.\fR' -is used. -.PP -The optional argument -.B \-s -causes only the grand total to -be given. -The optional argument -.B \-a -causes an entry to be generated -for each file. -Absence of either causes an entry to be generated for -each directory only. -.PP -A file which has two links to it is only counted once. -.SH BUGS -Non-directories -given as arguments (not under -.B \-a -option) are not listed. -.br -If there are too many distinct linked files, -.I du -counts the excess files multiply. //GO.SYSIN DD du.1 echo dump.1m sed 's/.//' >dump.1m <<'//GO.SYSIN DD dump.1m' -.TH DUMP 1M -.SH NAME -dump \- incremental file system dump -.SH SYNOPSIS -.B dump -[ key [ argument ... ] filesystem ] -.SH DESCRIPTION -.I Dump -copies to magnetic tape all files -changed after a certain date -in the -.I filesystem. -The -.I key -specifies the date and other options about the dump. -.I Key -consists of characters from -the set -.B 0123456789fusd. -.TP 5 -.B f -Place the dump on the next -.I argument -file -instead of the tape. -.TP 5 -.B u -If the dump completes successfully, -write the date of the beginning of the dump on -file `/etc/ddate'. -This file records a separate date for -each filesystem and each dump level. -.TP 5 -.B 0\-9 -This number is the `dump level'. -All files modified since the last date stored -in the file `/etc/ddate' for -the same filesystem at lesser levels -will be dumped. -If no date is determined by the level, -the beginning of time is assumed; -thus the option -.B 0 -causes the entire filesystem to be dumped. -.TP 5 -.B s -The size of the dump tape is specified in feet. -The number of feet is taken from the next -.I argument. -When the specified size is reached, -the dump will wait for reels to be changed. -The default size is 2300 feet. -.TP 5 -.B d -The density of the tape, expressed in BPI, -is taken from the next -.I argument. -This is used in calculating the amount of tape -used per write. The default is 1600. -.PP -.DT -If no arguments are given, -the -.I key -is assumed to be -.B 9u -and a default file system is dumped -to the default tape. -.PP -Now a short suggestion on how -perform dumps. -Start with a full level 0 dump -.PP - dump 0u -.PP -Next, -periodic level 9 dumps should be made on an -exponential progression of tapes. -(Sometimes called Tower of Hanoi \- 1 2 1 3 1 2 1 4 ... -tape 1 used every other time, -tape 2 used every fourth, -tape 3 used every eighth, etc.) -.PP - dump 9u -.PP -When the level 9 incremental approaches a full -tape (about 78000 blocks at 1600 BPI blocked 20), -a level 1 dump should be made. -.PP - dump 1u -.PP -After this, -the exponential series should progress as uninterrupted. -These level 9 dumps are based on the level 1 dump which -is based on the level 0 full dump. -This progression of levels of dump can be carried -as far as desired. -.SH FILES -default filesystem and tape vary with installation. -.br -/etc/ddate: record dump dates of filesystem/level. -.SH "SEE ALSO" -restor(1), dump(5), dumpdir(1) -.SH DIAGNOSTICS -If the dump requires more than one tape, -it will ask you to change tapes. -Reply with a new-line when this has been done. -.SH BUGS -Sizes are based on 1600 BPI blocked tape. -The raw magtape device has to be used to -approach these densities. -Read errors on the filesystem are ignored. -Write errors on the magtape are usually fatal. //GO.SYSIN DD dump.1m echo dumpdir.1m sed 's/.//' >dumpdir.1m <<'//GO.SYSIN DD dumpdir.1m' -.TH DUMPDIR 1M -.SH NAME -dumpdir \- print the names of files on a dump tape -.SH SYNOPSIS -.I dumpdir -[ -.B f -filename ] -.SH DESCRIPTION -.I Dumpdir -is used to read magtapes dumped with the -.I dump -command and list the names and inode numbers -of all the files and directories on the tape. -.PP -The -.B f -option causes -.I filename -as the name of the tape instead -of the default. -.SH FILES -default tape unit varies with installation -.br -rst* -.SH "SEE ALSO" -dump(1), restor(1) -.SH DIAGNOSTICS -If the dump extends over more than one tape, -it may ask you to change tapes. -Reply with a new-line when the next tape has been mounted. -.SH BUGS -There is redundant information on the tape -that could be used in case of tape reading problems. -Unfortunately, -.I dumpdir -doesn't use it. //GO.SYSIN DD dumpdir.1m echo echo.1 sed 's/.//' >echo.1 <<'//GO.SYSIN DD echo.1' -.TH ECHO 1 -.SH NAME -echo \- echo arguments -.SH SYNOPSIS -.B echo -[ -.B \-n -] -[ arg ] ... -.SH DESCRIPTION -.I Echo -writes its arguments separated by blanks and terminated by -a newline on the standard output. -If the flag -.B \-n -is used, -no newline is added to the output. -.PP -.I Echo -is useful for producing diagnostics in -shell programs and for writing constant data on pipes. -To send diagnostics to the standard error file, do -`echo ... 1>&2'. //GO.SYSIN DD echo.1 echo ed.1 sed 's/.//' >ed.1 <<'//GO.SYSIN DD ed.1' -.TH ED 1 -.if t .ds q \(aa -.if n .ds q ' -.SH NAME -ed \- text editor -.SH SYNOPSIS -.B ed -[ -.B \- -] [ -.B \-x -] [ name ] -.SH DESCRIPTION -.I Ed -is the standard text editor. -.PP -If a -.I name -argument is given, -.I ed -simulates an -.I e -command (see below)\| on the named file; that is to say, -the file is read into -.I ed's -buffer so that it can be edited. -If -.B \-x -is present, an -.I x -command is simulated first to handle an encrypted file. -The optional -.B \- -suppresses the printing -of character counts by -.I e, -.I r, -and -.I w -commands. -.PP -.I Ed -operates on a copy of any file it is editing; changes made -in the copy have no effect on the file until a -.IR w "" -(write)\| -command is given. -The copy of the text being edited resides -in a temporary file called the -.IR buffer . -.PP -Commands to -.I ed -have a simple and regular structure: zero or -more -.I addresses -followed by a single character -.I command, -possibly -followed by parameters to the command. -These addresses specify one or more lines in the buffer. -Missing addresses are supplied by default. -.PP -In general, only one command may appear on a line. -Certain commands allow the -addition of text to the buffer. -While -.I ed -is accepting text, it is said -to be in -.I "input mode." -In this mode, no commands are recognized; -all input is merely collected. -Input mode is left by typing a period `\fB.\fR' alone at the -beginning of a line. -.PP -.I Ed -supports a limited form of -.I "regular expression" -notation. -A regular expression specifies -a set of strings of characters. -A member of this set of strings is said to be -.I matched -by the regular expression. -In the following specification for regular expressions -the word `character' means any character but newline. -.IP 1. -Any character except a special character -matches itself. -Special characters are -the regular expression delimiter plus -.RB \e\|[\| . -and sometimes ^\|*\|$. -.IP 2. -A -.B . -matches any character. -.IP 3. -A \e followed by any character except a digit or (\|) matches that character. -.IP 4. -A nonempty string -.I s -bracketed -.RI [ \|s\| ] -(or -.RI [^ s\| ]) -matches any character in (or not in) -.I s. -In -.I s, -\e has no special meaning, and ] may only appear as -the first letter. -A substring -.I a\-b, -with -.I a -and -.I b -in ascending ASCII order, stands for the inclusive -range of ASCII characters. -.IP 5. -A regular expression of form 1-4 followed by * matches a sequence of -0 or more matches of the regular expression. -.IP 6. -A regular expression, -.I x, -of form 1-8, bracketed -.RI \e( \|x\| \e) -matches what -.I x -matches. -.IP 7. -A \e followed by a digit -.I n -matches a copy of the string that the -bracketed regular expression beginning with the -.IR n th -\e( matched. -.IP 8. -A regular expression of form 1-8, -.I x, -followed by a regular expression of form 1-7, -.I y -matches a match for -.I x -followed by a match for -.I y, -with the -.I x -match being as long as possible while still permitting a -.I y -match. -.IP 9. -A regular expression of form 1-8 preceded by ^ -(or followed by $), is constrained to matches that -begin at the left (or end at the right) end of a line. -.IP 10. -A regular expression of form 1-9 picks out the -longest among the leftmost matches in a line. -.IP 11. -An empty regular expression stands for a copy of the -last regular expression encountered. -.PP -Regular expressions are used in addresses to specify -lines and in one command -(see -.I s -below)\| -to specify a portion of a line which is to be replaced. -If it is desired to use one of -the regular expression metacharacters as an ordinary -character, that character may be preceded by `\e'. -This also applies to the character bounding the regular -expression (often `/')\| and to `\e' itself. -.PP -To understand addressing in -.I ed -it is necessary to know that at any time there is a -.I "current line." -Generally speaking, the current line is -the last line affected by a command; however, -the exact effect on the current line -is discussed under the description of -the command. -Addresses are constructed as follows. -.TP -1. -The character `\fB.\fR' addresses the current line. -.TP -2. -The character `$' addresses the last line of the buffer. -.TP -3. -A decimal number -.I n -addresses the -.IR n -th -line of the buffer. -.TP -4. -`\(fm\fIx\fR' addresses the line marked with the name -.IR x , -which must be a lower-case letter. -Lines are marked with the -.I k -command described below. -.TP -5. -A regular expression enclosed in slashes `/' addresses -the line found by searching forward from the current line -and stopping at the first line containing a -string that matches the regular expression. -If necessary the search wraps around to the beginning of the -buffer. -.TP -6. -A regular expression enclosed in queries `?' addresses -the line found by searching backward from the current line -and stopping at the first line containing -a string that matches the regular expression. -If necessary -the search wraps around to the end of the buffer. -.TP -7. -An address followed by a plus sign `+' -or a minus sign `\-' followed by a decimal number specifies that address plus -(resp. minus)\| the indicated number of lines. -The plus sign may be omitted. -.TP -8. -If an address begins with `+' or `\-' -the addition or subtraction is taken with respect to the current line; -e.g. `\-5' is understood to mean `\fB.\fR\-5'. -.TP -9. -If an address ends with `+' or `\-', -then 1 is added (resp. subtracted). -As a consequence of this rule and rule 8, -the address `\-' refers to the line before the current line. -Moreover, -trailing -`+' and `\-' characters -have cumulative effect, so `\-\-' refers to the current -line less 2. -.TP -10. -To maintain compatibility with earlier versions of the editor, -the character `^' in addresses is -equivalent to `\-'. -.PP -Commands may require zero, one, or two addresses. -Commands which require no addresses regard the presence -of an address as an error. -Commands which accept one or two addresses -assume default addresses when insufficient are given. -If more addresses are given than such a command requires, -the last one or two (depending on what is accepted)\| are used. -.PP -Addresses are separated from each other typically by a comma -`\fB,\fR'. -They may also be separated by a semicolon -`\fB;\fR'. -In this case the current line `\fB.\fR' is set to -the previous address before the next address is interpreted. -This feature can be used to determine the starting -line for forward and backward searches (`/', `?')\|. -The second address of any two-address sequence -must correspond to a line following the line corresponding to the first address. -.PP -In the following list of -.I ed -commands, the default addresses -are shown in parentheses. -The parentheses are not part of -the address, but are used to show that the given addresses are -the default. -.PP -As mentioned, it is generally illegal for more than one -command to appear on a line. -However, most commands may be suffixed by `p' -or by `l', in which case -the current line is either -printed or listed respectively -in the way discussed below. -.TP 5 -.RB (\| .\| )\|a -.br -.ns -.TP 5 - -.br -.ns -.TP 5 -.B . -.br -The append command reads the given text -and appends it after the addressed line. -`\fB.\fR' is left -on the last line input, if there -were any, otherwise at the addressed line. -Address `0' is legal for this command; text is placed -at the beginning of the buffer. -.TP 5 -.RB (\| .\| ,\ .\| )\|c -.br -.ns -.TP 5 - -.br -.ns -.TP 5 -.B . -.br -The change -command deletes the addressed lines, then accepts input -text which replaces these lines. -`\fB.\fR' is left at the last line input; if there were none, -it is left at the line preceding the deleted lines. -.TP 5 -.RB (\| .\| ,\ .\| )\|d -The delete command deletes the addressed lines from the buffer. -The line originally after the last line deleted becomes the current line; -if the lines deleted were originally at the end, -the new last line becomes the current line. -.TP 5 -e filename -The edit -command causes the entire contents of the buffer to be deleted, -and then the named file to be read in. -`\fB.\fR' is set to the last line of the buffer. -The number of characters read is typed. -`filename' is remembered for possible use as a default file name -in a subsequent -.I r -or -.I w -command. -If `filename' is missing, the remembered name is used. -.TP 5 -E filename -This command is the same as -.I e, -except that no diagnostic results when no -.I w -has been given since the last buffer alteration. -.TP 5 -f filename -The filename command prints the currently remembered file name. -If `filename' is given, -the currently remembered file name is changed to `filename'. -.TP 5 -(1,$)\|g/regular expression/command list -In the global -command, the first step is to mark every line which matches -the given regular expression. -Then for every such line, the -given command list is executed with `\fB.\fR' initially set to that line. -A single command or the first of multiple commands -appears on the same line with the global command. -All lines of a multi-line list except the last line must be ended with `\e'. -.I A, -.I i, -and -.I c -commands and associated input are permitted; -the `\fB.\fR' terminating input mode may be omitted if it would be on the -last line of the command list. -The commands -.I g -and -.I v -are not permitted in the command list. -.TP 5 -.RB (\| .\| )\|i -.ns -.TP 5 - -.br -.ns -.TP 5 -.B . -.br -This command inserts the given text before the addressed line. -`\fB.\fR' is left at the last line input, or, if there were none, -at the line before the addressed line. -This command differs from the -.I a -command only in the placement of the -text. -.TP 5 -.RB (\| .\| ,\ . +1)\|j -This command joins the addressed lines into a single line; -intermediate newlines simply disappear. -`\fB.\fR' is left at the resulting line. -.TP 5 -( \fB. \fR)\|k\fIx\fR -The mark command marks the addressed line with -name -.I x, -which must be a lower-case letter. -The address form `\(fm\fIx\fR' then addresses this line. -.ne 2.5 -.TP 5 -.RB (\| .\| ,\ .\| )\|l -The list command -prints the addressed lines in an unambiguous way: -non-graphic characters are -printed in two-digit octal, -and long lines are folded. -The -.I l -command may be placed on the same line after any non-i/o -command. -.TP 5 -.RB (\| .\| ,\ .\| )\|m\fIa -The move command repositions the addressed lines after the line -addressed by -.IR a . -The last of the moved lines becomes the current line. -.TP 5 -.RB (\| .\| ,\ .\| )\|p -The print command prints the addressed lines. -`\fB.\fR' -is left at the last line printed. -The -.I p -command -may -be placed on the same line after any non-i/o command. -.TP -.RB (\| .\| ,\ .\| )\|P -This command is a synonym for -.I p. -.TP 5 -q -The quit command causes -.I ed -to exit. -No automatic write -of a file is done. -.TP 5 -Q -This command is the same as -.I q, -except that no diagnostic results when no -.I w -has been given since the last buffer alteration. -.TP 5 -($)\|r filename -The read command -reads in the given file after the addressed line. -If no file name is given, -the remembered file name, if any, is used -(see -.I e -and -.I f -commands)\|. -The file name is remembered if there was no -remembered file name already. -Address `0' is legal for -.I r -and causes the -file to be read at the beginning of the buffer. -If the read is successful, the number of characters -read is typed. -`\fB.\fR' is left at the last line read in from the file. -.TP 5 -(\| \fB.\fR\|, \fB.\fR\|)\|s/regular expression/replacement/ or, -.br -.ns -.TP 5 -(\| \fB.\fR\|, \fB.\fR\|)\|s/regular expression/replacement/g -The substitute command searches each addressed -line for an occurrence of the specified regular expression. -On each line in which a match is found, -all matched strings are replaced by the replacement specified, -if the global replacement indicator `g' appears after the command. -If the global indicator does not appear, only the first occurrence -of the matched string is replaced. -It is an error for the substitution to fail on all addressed lines. -Any character other than space or new-line -may be used instead of `/' to delimit the regular expression -and the replacement. -`\fB.\fR' is left at the last line substituted. -.IP -An ampersand `&' appearing in the replacement -is replaced by the string matching the regular expression. -The special meaning of `&' in this context may be -suppressed by preceding it by `\e'. -The characters -.I `\|\en' -where -.I n -is a digit, -are replaced by the text matched by the -.IR n -th -regular subexpression -enclosed between `\e(' and `\e)'. -When -nested, parenthesized subexpressions -are present, -.I n -is determined by counting occurrences of `\e(' starting from the left. -.IP -Lines may be split by substituting new-line characters into them. -The new-line in the -replacement string -must be escaped by preceding it by `\e'. -.TP 5 -.RB (\| .\| ,\ .\| )\|t\|\fIa -This command acts just like the -.I m -command, except that a copy of the addressed lines is placed -after address -.I a -(which may be 0). -`\fB.\fR' is left on the last line of the copy. -.TP 5 -.RB (\| .\| ,\ .\| )\|u -The undo command restores the preceding contents -of the current line, which must be the last line -in which a substitution was made. -.TP 5 -(1, $)\|v/regular expression/command list -This command is the same as the global command -.I g -except that the command list is executed -.I g -with `\fB.\fR' initially set to every line -.I except -those -matching the regular expression. -.TP 5 -(1, $)\|w filename -.br -The write command writes the addressed lines onto -the given file. -If the file does not exist, -it is created mode 666 (readable and writable by everyone)\|. -The file name is remembered if there was no -remembered file name already. -If no file name is given, -the remembered file name, if any, is used -(see -.I e -and -.I f -commands)\|. -`\fB.\fR' is unchanged. -If the command is successful, the number of characters written is -printed. -.TP -(1,$)W filename -This command is the same as -.I w, -except that the addressed lines are appended to the file. -.TP 5 -x -A key string is demanded from the standard input. -Later -.I r, e -and -.I w -commands will encrypt and decrypt the text -with this key by the algorithm of -.IR crypt (1). -An explicitly empty key turns off encryption. -.TP 5 -($)\|= -The line number of the addressed line is typed. -`\fB.\fR' is unchanged by this command. -.TP 5 -! -The remainder of the line after the `!' is sent -to -.IR sh (1) -to be interpreted as a command. -.RB ` . ' -is unchanged. -.TP 5 -.RB (\| . +1)\| -An address alone on a line causes the addressed line to be printed. -A blank line alone is equivalent to `.+1p'; it is useful -for stepping through text. -.PP -If an interrupt signal (ASCII DEL)\| is sent, -.I ed -prints a `?' and returns to its command level. -.PP -Some size limitations: -512 characters per line, -256 characters per global command list, -64 characters per file name, -and 128K characters in the temporary file. -The limit on the number of lines depends on the amount of core: -each line takes 1 word. -.PP -When reading a file, -.I ed -discards ASCII NUL characters -and all characters after the last newline. -It refuses to read files containing non-ASCII characters. -.SH FILES -/tmp/e* -.br -ed.hup: work is saved here if terminal hangs up -.SH "SEE ALSO" -B. W. Kernighan, -.I -A Tutorial Introduction to the ED Text Editor -.br -B. W. Kernighan, -.I Advanced editing on UNIX -.br -sed(1), crypt(1) -.SH DIAGNOSTICS -`?name' for inaccessible file; -`?' for -errors in commands; -`?TMP' for temporary file overflow. -.PP -To protect against throwing away valuable work, -a -.I q -or -.I e -command is considered to be in error, unless a -.I w -has occurred since the last buffer change. -A second -.I q -or -.I e -will be obeyed regardless. -.SH BUGS -The -.I l -command mishandles DEL. -.br -A -.I ! -command cannot be subject to a -.I g -command. -.br -Because 0 is an illegal address for a -.I w -command, it is not possible to -create an empty file with -.I ed. //GO.SYSIN DD ed.1 echo eqn.1 sed 's/.//' >eqn.1 <<'//GO.SYSIN DD eqn.1' -.EQ -delim $$ -.EN -.TH EQN 1 2/22/74 -.SH NAME -eqn, neqn, checkeq \- typeset mathematics -.SH SYNOPSIS -.B eqn -[ -.BR \-d xy -] [ -.BR \-p n -] [ -.BR \-s n -] [ -.BR \-f n -] -[ file ] ... -.br -.B checkeq -[ file ] ... -.SH DESCRIPTION -.I Eqn -is a -troff(1) -preprocessor -for typesetting mathematics -on a Graphic Systems phototypesetter, -.I neqn -on terminals. -Usage is almost always -.PP - eqn file ... | troff -.br - neqn file ... | nroff -.PP -If no files are specified, -these programs -reads from the standard input. -A line beginning with `.EQ' marks the start of an equation; -the end of an equation -is marked by a line beginning with `.EN'. -Neither of these lines is altered, -so they may be defined in macro packages -to get -centering, numbering, etc. -It is also possible to set two characters as `delimiters'; -subsequent text between delimiters is also treated as -.ul -eqn -input. -Delimiters may be set to characters -.I x -and -.I y -with the command-line argument -.BI \-d xy -or (more commonly) with -`delim -.IR xy ' -between .EQ and .EN. -The left and right delimiters may be identical. -Delimiters are turned off by `delim off'. -All text that is neither between delimiters nor between .EQ and .EN -is passed through untouched. -.PP -The program -.I checkeq -reports missing or unbalanced delimiters and .EQ/.EN pairs. -.PP -Tokens within -.I eqn -are separated by -spaces, tabs, newlines, braces, double quotes, -tildes or circumflexes. -Braces {} are used for grouping; -generally speaking, -anywhere a single character like -.I x -could appear, a complicated construction -enclosed in braces may be used instead. -Tilde ~ represents a full space in the output, -circumflex ^ half as much. -.PP -.vs 13p -Subscripts and superscripts are produced with the keywords -.B sub -and -.B sup. -Thus -.I "x sub i" -makes -$x sub i$, -.I "a sub i sup 2" -produces -$a sub i sup 2$, -and -.I "e sup {x sup 2 + y sup 2}" -gives -$e sup {x sup 2 + y sup 2}$. -.PP -Fractions are made with -.BR over : -.I "a over b" -yields $a over b$. -.PP -.B sqrt -makes square roots: -.I "1 over sqrt {ax sup 2 +bx+c}" -results in -$1 over sqrt {ax sup 2 +bx+c}$ . -.PP -The keywords -.B from -and -.B to -introduce lower and upper -limits on arbitrary things: -$lim from {n-> inf} sum from 0 to n x sub i$ -is made with -.I "lim from {n\-> inf } sum from 0 to n x sub i." -.PP -Left and right brackets, braces, etc., of the right height are made with -.B left -and -.B right: -.I "left [ x sup 2 + y sup 2 over alpha right ] ~=~1" -produces -$left [ x sup 2 + y sup 2 over alpha right ] ~=~1$. -The -.B right -clause is optional. -Legal characters after -.B left -and -.B right -are braces, brackets, bars, -.B c -and -.B f -for ceiling and floor, -and "" for nothing at all (useful for a right-side-only bracket). -.PP -Vertical piles of things are made with -.BR pile , -.BR lpile , -.BR cpile , -and -.BR rpile : -.I "pile {a above b above c}" -produces -$pile {a above b above c}$. -There can be an arbitrary number of elements in a pile. -.B lpile -left-justifies, -.B pile -and -.B cpile -center, with different vertical spacing, -and -.B rpile -right justifies. -.PP -Matrices are made with -.BR matrix : -.I "matrix { lcol { x sub i above y sub 2 } ccol { 1 above 2 } }" -produces -$matrix { lcol { x sub i above y sub 2 } ccol { 1 above 2 } }$. -In addition, there is -.B rcol -for a right-justified column. -.PP -.vs 12p -Diacritical marks are made with -.BR dot , -.BR dotdot , -.BR hat , -.BR tilde , -.BR bar , -.BR vec , -.BR dyad , -and -.BR under : -.I "x dot = f(t) bar" -is -$x dot = f(t) bar$, -.I "y dotdot bar ~=~ n under" -is -$y dotdot bar ~=~ n under$, -and -.I "x vec ~=~ y dyad" -is -$x vec ~=~ y dyad$. -.PP -Sizes and font can be changed with -.B size -.I n -or -.B size -.BI \(+- n, -.BR roman , -.BR italic , -.BR bold , -and -.BR font -.I n. -Size and fonts can be changed globally in a document by -.B gsize -.I n -and -.B gfont -.IR n , -or by the command-line arguments -.BI \-s n -and -.BI \-f n. -.PP -Normally subscripts and superscripts are reduced by -3 point sizes from the previous size; -this may be changed by the command-line argument -.BI \-p n. -.PP -Successive display arguments can be lined up. -Place -.B mark -before the desired lineup point in the first equation; -place -.B lineup -at the place that is to line up vertically in subsequent equations. -.PP -Shorthands may be defined -or existing keywords redefined with -.BI define : -.I "define thing % replacement %" -defines a new token called -.I thing -which will be replaced by -.I replacement -whenever it appears thereafter. -The -.I % -may be any character that does not occur in -.I replacement. -.PP -Keywords like -.I sum -.EQ -( sum ) -.EN -.I int -.EQ -( int ) -.EN -.I inf -.EQ -( inf ) -.EN -and shorthands like ->= -.EQ -(>=) -.EN -\-> -.EQ -(->), -.EN -and -!= -.EQ -( != ) -.EN -are recognized. -Greek letters are spelled out in the desired case, as in -.I alpha -or -.I GAMMA. -Mathematical words like sin, cos, log are made Roman automatically. -.IR Troff (1) -four-character escapes like \e(bs (\(bs) -can be used anywhere. -Strings enclosed in double quotes "..." -are passed through untouched; -this permits keywords to be entered as text, -and can be used to communicate -with -.I troff -when all else fails. -.SH "SEE ALSO" -.PP -troff(1), tbl(1), ms(7), eqnchar(7) -.br -B. W. Kernighan and L. L. Cherry, -.ul -Typesetting Mathematics\(emUser's Guide -.br -J. F. Ossanna, -.ul -NROFF/TROFF User's Manual -.SH BUGS -.PP -To embolden digits, parens, etc., -it is necessary to quote them, -as in `bold "12.3"'. //GO.SYSIN DD eqn.1 echo expr.1 sed 's/.//' >expr.1 <<'//GO.SYSIN DD expr.1' -.TH EXPR 1 -.SH NAME -expr \- evaluate arguments as an expression -.SH SYNOPSIS -.B expr -arg -.B .\|.\|. -.SH DESCRIPTION -The arguments are taken as an expression. -After evaluation, the result is written on the standard output. -Each token of the expression is a separate argument. -.PP -The operators and keywords are listed below. -The list is in order of increasing precedence, -with equal precedence operators grouped. -.TP -.I expr | expr -yields the first -.I expr -if it is neither null nor `0', otherwise -yields the second -.I expr. -.TP -.I expr & expr -yields the first -.I expr -if neither -.I expr -is null or `0', otherwise yields `0'. -.TP -.I expr relop expr -where -.I relop is one of -< <= = != >= >, -yields `1' if the indicated comparison is true, `0' if false. -The comparison is numeric if both -.I expr -are integers, otherwise lexicographic. -.TP -.IR expr " + " expr -.br -.IR expr " - " expr -.br -addition or subtraction of the arguments. -.TP -.IR expr " * " expr -.br -.IR expr " / " expr -.br -.IR expr " % " expr -.br -multiplication, division, or remainder of the arguments. -.TP -.IR expr " : " expr -The matching operator compares the string first argument -with the regular expression second argument; -regular expression syntax is the same as that of -.IR ed (1). -The -\fB\\(\|.\|.\|.\|\\)\fP -pattern symbols can be used to select a portion of the -first argument. -Otherwise, -the matching operator yields the number of characters matched -(`0' on failure). -.TP -.RI ( " expr " ) -parentheses for grouping. -.PP -Examples: -.PP -To add 1 to the Shell variable -.IR a : -.IP -a=\`expr $a + 1\` -.PP -To find the filename part (least significant part) -of the pathname stored in variable -.I a, -which may or may not contain `/': -.IP -expr $a : \'.*/\e(\^.*\e)\' \'\^|\' $a -.LP -Note the quoted Shell metacharacters. -.SH "SEE ALSO" -ed(1), sh(1), test(1) -.SH DIAGNOSTICS -.I Expr -returns the following exit codes: -.PP - 0 if the expression is neither null nor `0', -.br - 1 if the expression -is null or `0', -.br - 2 for invalid expressions. //GO.SYSIN DD expr.1 echo f77.1 sed 's/.//' >f77.1 <<'//GO.SYSIN DD f77.1' -.TH F77 1 -.SH NAME -f77 \- Fortran 77 compiler -.SH SYNOPSIS -.B f77 -[ option ] ... file ... -.SH DESCRIPTION -.I F77 -is the UNIX Fortran 77 compiler. -It accepts several types of arguments: -.PP -Arguments whose names end with `.f' are taken to be -Fortran 77 source programs; -they are compiled, and -each object program is left on the file in the current directory -whose name is that of the source with `.o' substituted -for '.f'. -.PP -Arguments whose names end with `.r' or `.e' are taken to be Ratfor or EFL -source programs, respectively; these are first transformed by the -appropriate preprocessor, then compiled by f77. -.PP -In the same way, -arguments whose names end with `.c' or `.s' are taken to be C or assembly source programs -and are compiled or assembled, producing a `.o' file. -.PP -The following options have the same meaning as in -.IR cc (1). -See -.IR ld (1) -for load-time options. -.TP -.B \-c -Suppress loading and produce `.o' files for each source -file. -.TP -.B \-p -Prepare object files for profiling, see -.IR prof (1). -.TP -.SM -.B \-O -Invoke an -object-code optimizer. -.TP -.SM -.B \-S -Compile the named programs, and leave the -assembler-language output on corresponding files suffixed `.s'. -(No `.o' is created.). -.TP -.B \-f -Use a floating point interpreter (for PDP11's that lack -11/70-style floating point). -.TP -.BR \-o " output" -Name the final output file -.I output -instead of `a.out'. -.PP -The following options are peculiar to -.IR f77 . -.TP -.SM -.BR \-onetrip -Compile DO loops that are performed at least once if reached. -(Fortran 77 DO loops are not performed at all if the upper limit is smaller than the lower limit.) -.TP -.BR \-u -Make the default type of a variable `undefined' rather than using the default Fortran rules. -.TP -.BR \-C -Compile code to check that subscripts are within declared array bounds. -.TP -.BR \-w -Suppress all warning messages. -If the option is `\-w66', only Fortran 66 compatibility warnings are suppressed. -.TP -.BR \-F -Apply EFL and Ratfor preprocessor to relevant files, put the result in the file -with the suffix changed to `.f', but do not compile. -.TP -.BR \-m -Apply the M4 preprocessor to each `.r' or `.e' file before transforming -it with the Ratfor or EFL preprocessor. -.TP -.TP -.BI \-E x -Use the string -.I x -as an EFL option in processing `.e' files. -.TP -.BI \-R x -Use the string -.I x -as a Ratfor option in processing `.r' files. -.PP -Other arguments -are taken -to be either loader option arguments, or F77-compatible -object programs, typically produced by an earlier -run, -or perhaps libraries of F77-compatible routines. -These programs, together with the results of any -compilations specified, are loaded (in the order -given) to produce an executable program with name -`a.out'. -.SH FILES -.nf -.ta \w'/usr/lib/f77rt0.o 'u -file.[fresc] input file -file.o object file -a.out loaded output -./fort[pid].? temporary -/usr/lib/f77pass1 compiler -/lib/c1 pass 2 -/lib/c2 optional optimizer -/usr/lib/libF77.a intrinsic function library -/usr/lib/libI77.a Fortran I/O library -/lib/libc.a C library, see section 3 -.fi -.SH "SEE ALSO" -S. I. Feldman, -P. J. Weinberger, -.I -A Portable Fortran 77 Compiler -.br -prof(1), cc(1), ld(1) -.SH DIAGNOSTICS -The diagnostics produced by -.I f77 -itself are intended to be -self-explanatory. -Occasional messages may be produced by the loader. -.SH BUGS -The Fortran 66 subset of the language has been -exercised extensively; -the newer features have not. //GO.SYSIN DD f77.1 echo factor.1 sed 's/.//' >factor.1 <<'//GO.SYSIN DD factor.1' -.TH FACTOR 1 -.SH NAME -factor, primes \- factor a number, generate large primes -.SH SYNOPSIS -.B factor -[ number ] -.PP -.B primes -.SH DESCRIPTION -When -.I factor -is invoked without an argument, it waits for a number to be typed in. -If you type in a positive -number less than 2\u\s756\s0\d (about -.if n 7.2e16) -.if t 7.2\(mu10\u\s716\s0\d\|) -it will factor the number and print its prime factors; each one is printed -the proper number of times. -Then it waits for another number. -It exits if it encounters a zero or any non-numeric character. -.PP -If -.I factor -is invoked with an argument, it factors the number -as above and then exits. -.PP -Maximum time to factor is proportional to -.if n sqrt(n) -.if t \(sr\o'\fIn\fR\(rn' -and occurs when -.I n -is prime -or the square of a prime. -It takes 1 minute to factor a prime -near -10\u\s714\s0\d -on a PDP11. -.PP -When -.I primes -is invoked, it waits for a number to be typed in. -If you type in a positive -number less than 2\u\s756\s0\d -it will print all primes greater than or -equal to this number. -.SH DIAGNOSTICS -`Ouch.' for input out of range or for garbage input. //GO.SYSIN DD factor.1 echo file.1 sed 's/.//' >file.1 <<'//GO.SYSIN DD file.1' -.TH FILE 1 -.SH NAME -file \- determine file type -.SH SYNOPSIS -.B file -file ... -.SH DESCRIPTION -.I File -performs a series of tests on each argument -in an attempt to classify it. -If an argument appears to be ascii, -.I file -examines the first 512 bytes -and tries to guess its language. -.SH BUGS -It often makes mistakes. -In particular it often suggests that -command files are C programs. //GO.SYSIN DD file.1 echo find.1 sed 's/.//' >find.1 <<'//GO.SYSIN DD find.1' -.TH FIND 1 -.SH NAME -find \- find files -.SH SYNOPSIS -.B find -pathname-list expression -.SH DESCRIPTION -.I Find -recursively descends -the directory hierarchy for -each pathname in the -.I pathname-list -(i.e., one or more pathnames) -seeking files that match a boolean -.I expression -written in the primaries given below. -In the descriptions, the argument -.I n -is used as a decimal integer -where -.I +n -means more than -.I n, -.I \-n -means less than -.I n -and -.I n -means exactly -.IR n . -.TP 10n -.BR \-name " filename" -True if the -.I filename -argument matches the current file name. -Normal -Shell -argument syntax may be used if escaped (watch out for -`[', `?' and `*'). -.TP -.BR \-perm " onum" -True if the file permission flags -exactly -match the -octal number -.I onum -(see -.IR chmod (1)). -If -.I onum -is prefixed by a minus sign, -more flag bits (017777, see -.IR stat (2)) -become significant and -the flags are compared: -.IR (flags&onum)==onum . -.TP -.BR \-type " c" -True if the type of the file -is -.I c, -where -.I c -is -.B "b, c, d" -or -.B f -for -block special file, character special file, -directory or plain file. -.TP -.BR \-links " n" -True if the file has -.I n -links. -.TP -.BR \-user " uname" -True if the file belongs to the user -.I uname -(login name or numeric user ID). -.TP -.BR \-group " gname" -True if the file belongs to group -.I gname -(group name or numeric group ID). -.TP -.BR \-size " n" -True if the file is -.I n -blocks long (512 bytes per block). -.TP -.BR \-inum " n" -True if the file has inode number -.I n. -.TP -.BR \-atime " n" -True if the file has been accessed in -.I n -days. -.TP -.BR \-mtime " n" -True if the file has been modified in -.I n -days. -.TP -.BR \-exec " command" -True if the executed command returns -a zero value as exit status. -The end of the command must be punctuated by an escaped -semicolon. -A command argument `{}' is replaced by the -current pathname. -.TP -.BR \-ok " command" -Like -.B \-exec -except that the generated command is written on -the standard output, then the standard input is read -and the command executed only upon response -.BR y . -.TP -.B \-print -Always true; -causes the current pathname to be printed. -.TP -.BR \-newer " file" -True if -the current file has been modified more recently than the argument -.I file. -.PP -The primaries may be combined using the following operators -(in order of decreasing precedence): -.TP 4 -1) -A parenthesized group of primaries and operators -(parentheses are special to the Shell and must be escaped). -.TP 4 -2) -The negation of a primary -(`!' is the unary -.I not -operator). -.TP 4 -3) -Concatenation of primaries -(the -.I and -operation -is implied by the juxtaposition of two primaries). -.TP 4 -4) -Alternation of primaries -.RB "(`" \-o "' is the" -.I or -operator). -.SH EXAMPLE -To remove all files named -`a.out' or `*.o' that have not been accessed for a week: -.IP "" .2i -find / \\( \-name a.out \-o \-name '*.o' \\) -\-atime +7 \-exec rm {} \\; -.SH FILES -/etc/passwd -.br -/etc/group -.SH "SEE ALSO" -sh(1), test(1), filsys(5) -.SH BUGS -The syntax is painful. //GO.SYSIN DD find.1 echo graph.1g sed 's/.//' >graph.1g <<'//GO.SYSIN DD graph.1g' -.TH GRAPH 1G -.SH NAME -graph \- draw a graph -.SH SYNOPSIS -.B graph -[ option ] ... -.SH DESCRIPTION -.I Graph -with no options takes pairs of numbers from the -standard input as abscissas and -ordinates of a graph. -Successive points are connected by straight lines. -The graph is encoded on the standard output -for display by the -.IR plot (1) -filters. -.PP -If the coordinates of a point are followed by -a nonnumeric string, that string is printed as a -label beginning on the point. -Labels may be surrounded with quotes "...", in -which case they may be empty or contain blanks -and numbers; -labels never contain newlines. -.PP -The following options are recognized, -each as a separate argument. -.TP -.B \-a -Supply abscissas automatically (they are missing from -the input); spacing is given by the next -argument (default 1). -A second optional argument is the starting point for -automatic abscissas (default 0 or lower limit given by -.BR \-x ). -.TP -.B \-b -Break (disconnect) the graph after each label in the input. -.TP -.B \-c -Character string given by next argument -is default label for each point. -.TP -.B \-g -Next argument is grid style, -0 no grid, 1 frame with ticks, 2 full grid (default). -.TP -.B \-l -Next argument is label for graph. -.TP -.B \-m -Next argument is mode (style) -of connecting lines: -0 disconnected, 1 connected (default). -Some devices give distinguishable line styles -for other small integers. -.TP -.B \-s -Save screen, don't erase before plotting. -.TP -\fB\-x\fR [ \fBl\fR ] -If -.B l -is present, x axis is logarithmic. -Next 1 (or 2) arguments are lower (and upper) -.IR x "" -limits. -Third argument, if present, is grid spacing on -.I x -axis. -Normally these quantities are determined automatically. -.TP -\fB\-y\fR [ \fBl\fR ] -Similarly for -.IR y . -.TP -.B \-h -Next argument is fraction of space for height. -.TP -.B \-w -Similarly for width. -.TP -.B \-r -Next argument is fraction of space to move right before plotting. -.TP -.B \-u -Similarly to move up before plotting. -.TP -.B \-t -Transpose horizontal and vertical axes. -(Option -.B \-x -now applies to the vertical axis.) -.PP -A legend indicating grid range is produced -with a grid unless the -.B \-s -option is present. -.PP -If a specified lower limit exceeds the upper limit, -the axis -is reversed. -.SH "SEE ALSO" -spline(1), plot(1) -.SH BUGS -.I Graph -stores all points internally and drops those for which -there isn't room. -.br -Segments that run out of bounds are dropped, not windowed. -.br -Logarithmic axes may not be reversed. //GO.SYSIN DD graph.1g echo grep.1 sed 's/.//' >grep.1 <<'//GO.SYSIN DD grep.1' -.TH GREP 1 -.SH NAME -grep, egrep, fgrep \- search a file for a pattern -.SH SYNOPSIS -.B grep -[ option ] ... -expression [ file ] ... -.LP -.B egrep -[ option ] ... -[ expression ] -[ file ] ... -.PP -.B fgrep -[ option ] ... -[ strings ] -[ file ] -.SH DESCRIPTION -Commands of the -.I grep -family search the input -.I files -(standard input default) -for lines matching -a pattern. -Normally, each line found -is copied to the standard output; -unless the -.B \-h -flag is used, -the file name is shown if there is more than one input file. -.PP -.I Grep -patterns are limited regular expressions in the style of -.IR ed (1); -it uses a compact nondeterministic algorithm. -.I Egrep -patterns are full regular expressions; -it uses a fast deterministic algorithm that -sometimes needs exponential space. -.I Fgrep -patterns are fixed strings; it is fast and compact. -.PP -The following options are recognized. -.TP -.B \-v -All lines but those matching -are printed. -.TP -.B \-c -Only a count of matching lines is printed. -.TP -.B \-l -The names of files with matching lines are listed (once) -separated by newlines. -.TP -.B \-n -Each line is preceded by -its line number in the file. -.TP -.B \-b -Each line is preceded by the block number -on which it was found. -This is sometimes useful in locating -disk block numbers by context. -.TP -.B \-s -No output is produced, only status. -.TP -.B \-h -Do not print filename headers with output lines. -.TP -.B \-y -Lower case letters in the pattern will also match -upper case letters in the input -.RI ( grep -only). -.TP -.BI \-e " expression" -Same as a simple -.I expression -argument, -but useful when the -.I expression -begins with a \-. -.TP -.BI \-f " file" -The regular expression -.RI ( egrep ) -or string list -.RI ( fgrep ) -is taken from the -.I file. -.TP -.B \-x -(Exact) only lines matched in their entirety are printed -.RI ( fgrep -only). -.PP -Care should be taken when -using the characters -$ * [ ^ | ? \' " ( ) and \e in the -.I expression -as they are -also meaningful to the Shell. -It is safest to enclose the -entire -.I expression -argument in single quotes \' \'. -.PP -.I Fgrep -searches for lines that contain one of the (newline-separated) -.I strings. -.PP -.I Egrep -accepts extended regular expressions. -In the following description `character' excludes -newline: -.IP -A \e followed by a single character -matches that character. -.IP -The character ^ -($) matches the beginning (end) of a line. -.IP -A -.B . -matches any character. -.IP -A single character not otherwise endowed with special -meaning matches that character. -.IP -A string enclosed in brackets [\|] -matches any single character from the string. -Ranges of ASCII character codes may be abbreviated -as in `a\-z0\-9'. -A ] -may occur only as the first character of the string. -A literal \- must be placed where it can't be -mistaken as a range indicator. -.IP -A regular expression followed by * (+, ?) matches a sequence -of 0 or more (1 or more, 0 or 1) -matches of the regular expression. -.IP -Two regular expressions concatenated -match a match of the first followed by a match of -the second. -.IP -Two regular expressions separated by | or newline -match either a match for the first or a match for the -second. -.IP -A regular expression enclosed in parentheses -matches a match for the regular expression. -.LP -The order of precedence of operators -at the same parenthesis level -is [\|] then -*+? then concatenation then | and newline. -.SH "SEE ALSO" -ed(1), -sed(1), -sh(1) -.SH DIAGNOSTICS -Exit status is 0 if any matches are found, -1 if none, 2 for syntax errors or inaccessible files. -.SH BUGS -Ideally there should be only one -.I grep, -but we don't know a single algorithm that spans a wide enough -range of space-time tradeoffs. -.PP -Lines -are limited to 256 characters; -longer lines are truncated. //GO.SYSIN DD grep.1 echo icheck.1m sed 's/.//' >icheck.1m <<'//GO.SYSIN DD icheck.1m' -.TH ICHECK 1M -.SH NAME -icheck \- file system storage consistency check -.SH SYNOPSIS -.B icheck -[ -.B \-s -] [ -.B \-b -numbers ] -[ filesystem ] -.SH DESCRIPTION -.I Icheck -examines a file system, -builds a bit map of used blocks, -and compares this bit map against -the free list maintained on the file system. -If the file system is not specified, -a set of default file systems -is checked. -The normal output of -.I icheck -includes a report of -.IP "" -The total number of files and the numbers of -regular, directory, block special and character special files. -.IP "" -The total number of blocks in use and the numbers of -single-, double-, and triple-indirect blocks and directory blocks. -.IP "" -The number of free blocks. -.IP "" -The number of blocks missing; i.e. not in any file -nor in the free list. -.PP -The -.B \-s -option causes -.I icheck -to ignore the actual free list and reconstruct a new one -by rewriting the super-block of the file system. -The file system should be dismounted while this is done; -if this is not possible (for example if -the root file system has to be salvaged) -care should be taken that the system is quiescent and that -it is rebooted immediately afterwards so that the old, bad in-core -copy of the super-block will not continue to be used. -Notice also that -the words in the super-block -which indicate the size of the free list and of the -i-list are believed. -If the super-block has been curdled -these words will have to be patched. -The -.B \-s -option -causes the normal output reports to be suppressed. -.PP -Following the -.B \-b -option is a list of block numbers; -whenever any of the named blocks turns up in a file, -a diagnostic is produced. -.PP -.I Icheck -is faster if the raw version of the special file is used, -since it reads the i-list many blocks at a time. -.SH FILES -Default file systems vary with installation. -.SH "SEE ALSO" -dcheck(1), ncheck(1), -filsys(5), clri(1) -.SH DIAGNOSTICS -For duplicate blocks -and bad blocks (which lie outside the file system) -.I icheck -announces the difficulty, the i-number, and the kind of block involved. -If a read error is encountered, -the block number of the bad block is printed and -.I icheck -considers it to contain 0. -`Bad freeblock' means that -a block number outside the available space was encountered in the free list. -`\fIn\fR dups in free' -means that -.IR n "" -blocks were found in the free list which -duplicate blocks either in some file or in the earlier part of the free list. -.SH BUGS -Since -.I icheck -is inherently two-pass in nature, extraneous diagnostics -may be produced if applied to active file systems. -.br -It believes even preposterous super-blocks and -consequently can get core images. //GO.SYSIN DD icheck.1m echo intro.1 sed 's/.//' >intro.1 <<'//GO.SYSIN DD intro.1' -.TH INTRO 1 -.SH NAME -intro \- introduction to commands -.SH DESCRIPTION -This section describes publicly accessible commands -in alphabetic order. -Certain distinctions of purpose are made in the headings: -.TP -(1) -Commands of general utility. -.TP -(1C) -Commands for communication with other systems. -.TP -(1G) -Commands used primarily for graphics and computer-aided design. -.TP -(1M) -Commands used primarily for system maintenance. -.PP -The word `local' at the foot of a page means that the -command is not intended for general distribution. -.SH SEE ALSO -.SH DIAGNOSTICS -Section (6) for computer games. -.PP -.I How to get started, -in the Introduction. -.SH DIAGNOSTICS -Upon termination each command returns two bytes of status, -one supplied by the system giving the cause for -termination, and (in the case of `normal' termination) -one supplied by the program, -see -.I wait -and -.IR exit (2). -The former byte is 0 for normal termination, the latter -is customarily 0 for successful execution, nonzero -to indicate troubles such as erroneous parameters, bad or inaccessible data, -or other inability to cope with the task at hand. -It is called variously `exit code', `exit status' or -`return code', and is described only where special -conventions are involved. //GO.SYSIN DD intro.1 echo iostat.1m sed 's/.//' >iostat.1m <<'//GO.SYSIN DD iostat.1m' -.TH IOSTAT 1M -.SH NAME -iostat \- report I/O statistics -.SH SYNOPSIS -.B iostat -[ option ] ... -[ interval [ count ] ] -.SH DESCRIPTION -.I Iostat -delves into the system and reports certain statistics kept about -input-output activity. -Information is kept about up to three different disks -(RF, RK, RP) and about typewriters. -For each disk, IO completions and number of words transferred -are counted; for typewriters collectively, the number -of input and output characters are counted. -Also, each sixtieth of a second, -the state of each disk is examined -and a tally is made if the disk is active. -The tally goes into -one of four categories, depending on whether the system is -executing in user mode, in `nice' (background) -user mode, in system mode, or idle. -From all these numbers and from the known transfer rates -of the devices it is possible to determine -information such as the degree of IO overlap -and average seek times for each device. -.PP -The optional -.I interval -argument causes -.I iostat -to report once each -.I interval -seconds. -The first report is for all time since a reboot and each -subsequent report is for the last interval only. -.PP -The optional -.I count -argument restricts the number of reports. -.PP -With no option argument -.I iostat -reports for each disk the number of transfers per minute, -the milliseconds -per average seek, -and the milliseconds per data transfer exclusive of seek time. -It also gives the percentage of time the system has -spend in each of the four categories mentioned above. -.PP -The following options are available: -.TP -.B \-t -Report the number of characters of terminal IO per second as well. -.TP -.B \-i -Report the percentage of time spend in each -of the four categories mentioned above, -the percentage of time each disk was active (seeking or transferring), -the percentage of time any disk was active, -and the percentage of time spent in `IO wait:' -idle, but with a disk active. -.TP -.B \-s -Report the raw timing information: 32 numbers indicating -the percentage of time spent in each of the possible -configurations of 4 system states and 8 IO states -(3 disks each active or not). -.TP -.B \-b -Report on the usage of IO buffers. -.SH FILES -/dev/mem, /unix //GO.SYSIN DD iostat.1m echo join.1 sed 's/.//' >join.1 <<'//GO.SYSIN DD join.1' -.TH JOIN 1 -.SH NAME -join \- relational database operator -.SH SYNOPSIS -.B join -[ -options -] -file1 file2 -.SH DESCRIPTION -.I Join -forms, on the standard output, -a join -of the two relations specified by the lines of -.I file1 -and -.IR file2 . -If -.I file1 -is `\-', the standard input is used. -.PP -.I File1 -and -.I file2 -must be sorted in increasing ASCII collating -sequence on the fields -on which they are to be joined, -normally the first in each line. -.PP -There is one line in the output -for each pair of lines in -.I file1 -and -.I file2 -that have identical join fields. -The output line normally consists of the common field, -then the rest of the line from -.IR file1 , -then the rest of the line from -.IR file2 . -.PP -Fields are normally separated by blank, tab or newline. -In this case, multiple separators count as one, and -leading separators are discarded. -.PP -These options are recognized: -.TP -.BI \-a n -In addition to the normal output, -produce a line for each unpairable line in file -.IR n , -where -.I n -is 1 or 2. -.TP -.BI \-e \ s -Replace empty output fields by string -.IR s . -.TP -.BI \-j n\ m -Join on the -.IR m th -field of file -.IR n . -If -.I n -is missing, use the -.IR m th -field in each file. -.TP -.BI \-o \ list -Each output line comprises the fields specifed in -.IR list , -each element of which has the form -.IR n . m , -where -.I n -is a file number and -.I m -is a field number. -.PP -.TP -.BI \-t c -Use character -.I c -as a separator (tab character). -Every appearance of -.I c -in a line is significant. -.SH "SEE ALSO" -sort(1), comm(1), awk(1) -.SH BUGS -With default field separation, -the collating sequence is that of -.IR sort\ \-b ; -with -.BR \-t , -the sequence is that of a plain sort. -.PP -The conventions of -.I join, sort, comm, uniq, look -and -.IR awk (1) -are wildly incongruous. //GO.SYSIN DD join.1 echo kill.1 sed 's/.//' >kill.1 <<'//GO.SYSIN DD kill.1' -.TH KILL 1 -.SH NAME -kill \- terminate a process with extreme prejudice -.SH SYNOPSIS -.B kill -[ -.BR \- signo -] -processid ... -.SH DESCRIPTION -.I Kill -sends signal 15 (terminate) to the specified processes. -If a signal number preceded by `\-' is given -as first argument, that signal is sent instead of -terminate -(see -.IR signal (2)). -This will kill processes that do not catch the signal; -in particular `kill \-9 ...' is a sure kill. -.PP -By convention, if process number 0 is specified, all members -in the process group (i.e. processes resulting from -the current login) are signaled. -.PP -The killed processes must belong -to the current user unless -he is the super-user. -To shut the system down and bring it up single user -the super-user may -use `kill \-1 1'; see -.IR init (8). -.PP -The process number of an asynchronous process -started with `&' is reported by the shell. -Process numbers can also be found by using -.IR ps (1). -.SH "SEE ALSO" -ps(1), kill(2), signal(2) //GO.SYSIN DD kill.1 echo ld.1 sed 's/.//' >ld.1 <<'//GO.SYSIN DD ld.1' -.TH LD 1 -.SH NAME -ld \- loader -.SH SYNOPSIS -.B ld -[ option ] file ... -.SH DESCRIPTION -.I Ld -combines several -object programs into one, resolves external -references, and searches libraries. -In the simplest case several object -.I files -are given, and -.I ld -combines them, producing -an object module which can be either executed or -become the input for a further -.I ld -run. -(In the latter case, the -.B \-r -option must be given -to preserve the relocation bits.) -The output of -.I ld -is left on -.BR a.out . -This file is made executable -only if no errors occurred during the load. -.PP -The argument routines are concatenated in the order -specified. The entry point of the output is the -beginning of the first routine. -.PP -If any argument is a library, it is searched exactly once -at the point it is encountered in the argument list. -Only those routines defining an unresolved external -reference are loaded. -If a routine from a library -references another routine in the library, -and the library has not been processed by -.IR ranlib (1), -the referenced routine must appear after the -referencing routine in the library. -Thus the order of programs within libraries -may be important. -If the first member of a library is named -`__.SYMDEF', -then it is understood to be a dictionary for the -library -such -as produced by -.IR ranlib ; -the dictionary is searched -iteratively to satisfy as many references as possible. -.PP -The symbols `\_etext', `\_edata' and `\_end' -(`etext', `edata' and `end' in C) -are reserved, and if referred to, -are set to the first location above the program, -the first location above initialized data, -and the first location above all data respectively. -It is erroneous to define these symbols. -.PP -.I Ld -understands several options. -Except for -.BR \-l , -they should appear before the file names. -.TP -.B \-s -`Strip' the output, that is, remove the symbol table -and relocation bits to save space (but impair the -usefulness of the debugger). -This information can also be removed by -.IR strip (1). -.TP -.B \-u -Take the following argument as a symbol and enter -it as undefined in the symbol table. This is useful -for loading wholly from a library, since initially the symbol -table is empty and an unresolved reference is needed -to force the loading of the first routine. -.TP -.BI \-l x -This -option is an abbreviation for the library name -.RI `/lib/lib x .a', -where -.I x -is a string. -If that does not exist, -.I ld -tries -.RI `/usr/lib/lib x .a'. -A library is searched when its name is encountered, -so the placement of a -.B \-l -is significant. -.TP -.B \-x -Do not preserve local -(non-.globl) symbols in the output symbol table; only enter -external symbols. -This option saves some space in the output file. -.TP -.B \-X -Save local symbols -except for those whose names begin with `L'. -This option is used by -.IR cc (1) -to discard internally generated labels while -retaining symbols local to routines. -.TP -.B \-r -Generate relocation bits in the output file -so that it can be the subject of another -.I ld -run. -This flag also prevents final definitions from being -given to common symbols, -and suppresses the `undefined symbol' diagnostics. -.TP -.B \-d -Force definition of common storage -even if the -.B \-r -flag is present. -.TP -.B \-n -Arrange that -when the output file is executed, -the text portion will be read-only and shared -among all users executing the file. -This involves moving the data areas up to the first -possible 4K word boundary following the -end of the text. -.TP -.B \-i -When the output file is executed, the program -text and data areas will live in separate address spaces. -The only difference between this option -and -.B \-n -is that here the data starts at location 0. -.TP -.B \-o -The -.I name -argument after -.B \-o -is used as the name of the -.I ld -output file, instead of -.BR a.out . -.TP -.B \-e -The following argument is taken to be the -name of the entry point of the loaded -program; location 0 is the default. -.TP -.B \-O -This is an overlay file, only the text segment -will be replaced by -.IR exec (2). -Shared data must have the same layout as in -the program overlaid. -.TP -.B \-D -The next argument is a decimal number that sets -the size of the data segment. -.SH FILES -.ta \w'/usr/lib/lib*.a\ \ 'u -/lib/lib*.a libraries -.br -/usr/lib/lib*.a more libraries -.br -a.out output file -.SH "SEE ALSO" -as(1), ar(1), cc(1), ranlib(1) -.SH BUGS //GO.SYSIN DD ld.1 echo lex.1 sed 's/.//' >lex.1 <<'//GO.SYSIN DD lex.1' -.TH LEX 1 -.SH NAME -lex \- generator of lexical analysis programs -.SH SYNOPSIS -.B lex -[ -.B \-tvfn -] [ file ] ... -.SH DESCRIPTION -.I Lex -generates programs to be used in simple lexical analyis of text. -The input -.I files -(standard input default) -contain regular expressions -to be searched for, and actions written in C to be executed when -expressions are found. -.PP -A C source program, `lex.yy.c' is generated, to be compiled thus: -.IP -cc lex.yy.c \-ll -.LP -This program, when run, copies unrecognized portions of -the input to the output, -and executes the associated -C action for each regular expression that is recognized. -.PP -The following -.I lex -program converts upper case to lower, -removes blanks at the end of lines, -and replaces multiple blanks by single blanks. -.IP "" -.nf -.ta \w'[A\-Z] 'u -%% -[A\-Z] putchar(yytext[0]+\'a\'\-\'A\'); -[ ]+$ -[ ]+ putchar(\' \'); -.fi -.PP -The options have the following meanings. -.TP -.B \-t -Place the result on the standard output instead of in file -`lex.yy.c'. -.TP -.B \-v -Print a one-line summary of statistics of the generated analyzer. -.TP -.B \-n -Opposite of -.BR \-v ; -.B \-n -is default. -.TP -.B \-f -`Faster' compilation: don't bother to pack -the resulting tables; limited to small programs. -.SH "SEE ALSO" -yacc(1) -.br -M. E. Lesk and E. Schmidt, -.I LEX \- Lexical Analyzer Generator //GO.SYSIN DD lex.1 echo lint.1 sed 's/.//' >lint.1 <<'//GO.SYSIN DD lint.1' -.TH LINT 1 -.SH NAME -lint \- a C program verifier -.SH SYNOPSIS -.B lint -[ -.B \-abchnpuvx -] -file ... -.SH DESCRIPTION -.I Lint -attempts to detect features of the C program -.I files -which are -likely to be bugs, or non-portable, or wasteful. -It also checks the type usage of the program more strictly -than the compilers. -Among the things which are currently found are -unreachable statements, -loops not entered at the top, -automatic variables declared and not used, -and logical expressions whose value is constant. -Moreover, the usage of functions is checked to find -functions which return values in some places and not in others, -functions called with varying numbers of arguments, -and functions whose values are not used. -.PP -By default, it is assumed that all the -.I files -are to be loaded together; they are checked for -mutual compatibility. -Function definitions for certain libraries are available to -.IR lint ; -these libraries are referred to by a -conventional name, -such as `-lm', in the style of -.IR ld (1). -.PP -Any number of the options in the following list -may be used. -The -.SM -.BR \-D "\*S," -.SM -.BR \-U "\*S," -and -.SM -.B \-I -options of -.IR cc (1) -are also recognized as separate arguments. -.TP -.B p -Attempt to check portability to the -.I IBM -and -.I GCOS -dialects of C. -.TP -.B h -Apply a number of heuristic tests to attempt to -intuit bugs, improve style, and reduce waste. -.TP -.B b -Report -.I break -statements that cannot be reached. -(This is not the default because, unfortunately, -most -.I lex -and many -.I yacc -outputs produce dozens of such comments.) -.TP -.B v -Suppress complaints about unused arguments in functions. -.TP -.B x -Report variables referred to by extern declarations, -but never used. -.TP -.B a -Report assignments of long values to int variables. -.TP -.B c -Complain about casts which have questionable portability. -.TP -.B u -Do not complain about functions and variables used and not -defined, or defined and not used (this is suitable for running -.I lint -on a subset of files out of a larger program). -.TP -.B n -Do not check compatibility against the standard library. -.PP -.IR Exit (2) -and other functions which do not return -are not understood; this causes various lies. -.PP -Certain conventional comments in the C source -will change the behavior of -.IR lint : -.TP -/*NOTREACHED*/ -at appropriate points -stops comments about unreachable code. -.TP -.RI /*VARARGS n */ -suppresses -the usual checking for variable numbers of arguments -in the following function declaration. -The data types of the first -.I n -arguments are checked; -a missing -.I n -is taken to be 0. -.TP -/*NOSTRICT*/ -shuts off strict type checking in the next expression. -.TP -/*ARGSUSED*/ -turns on the -.B \-v -option for the next function. -.TP -/*LINTLIBRARY*/ -at the beginning of a file shuts off complaints about -unused functions in this file. -.SH FILES -/usr/lib/lint[12] programs -.br -/usr/lib/llib-lc declarations for standard functions -.br -/usr/lib/llib-port declarations for portable functions -.SH SEE ALSO -cc(1) -.br -S. C. Johnson, -.I Lint, a C Program Checker //GO.SYSIN DD lint.1 echo ln.1 sed 's/.//' >ln.1 <<'//GO.SYSIN DD ln.1' -.TH LN 1 -.SH NAME -ln \- make a link -.SH SYNOPSIS -.B ln -name1 [ name2 ] -.SH DESCRIPTION -A link is a directory entry referring -to a file; the same file (together with -its size, all its protection -information, etc.) -may have several links to it. -There is no way to distinguish a link to a file -from its original directory entry; -any changes in the -file are effective -independently of the name by which the file is known. -.PP -.I Ln -creates a link to an existing file -.IR name1 . -If -.I name2 -is given, the link has that name; -otherwise it is placed in the current directory -and its name is the last component -of -.IR name1 . -.PP -It is forbidden to link to a directory -or to link across file systems. -.SH "SEE ALSO" -rm(1) //GO.SYSIN DD ln.1 echo login.1 sed 's/.//' >login.1 <<'//GO.SYSIN DD login.1' -.TH LOGIN 1 -.SH NAME -login \- sign on -.SH SYNOPSIS -.B login -[ username ] -.SH DESCRIPTION -The -.I login -command -is used when a user initially -signs on, or it may be used at any time to change -from one user to another. -The latter case is the one summarized above and -described here. -See `How to Get Started' for how to dial up initially. -.PP -If -.I login -is invoked without an argument, -it asks for a user name, and, if -appropriate, a password. -Echoing is turned off (if possible) during the typing of the password, -so it will not appear on the written record of the -session. -.PP -After a successful login, -accounting files are updated and -the user is informed of the -existence of -.I .mail -and message-of-the-day files. -.I Login -initializes the user and group IDs and the working directory, -then executes a command interpreter (usually -.IR sh (1)) -according to specifications found in a password file. -Argument 0 of the command interpreter is `\-sh. -.PP -Login is recognized by -.IR sh (1) -and executed directly (without forking). -.SH FILES -.ta \w'/usr/adm/wtmp\ \ 'u -/etc/utmp accounting -.br -/usr/adm/wtmp accounting -.br -/usr/mail/* mail -.br -/etc/motd message-of-the-day -.br -/etc/passwd password file -.SH "SEE ALSO" -init(8), newgrp(1), getty(8), mail(1), passwd(1), passwd(5) -.SH DIAGNOSTICS -`Login incorrect,' -if the name or the password is bad. -.br -`No Shell', `cannot open password file', `no directory': -consult a programming counselor. //GO.SYSIN DD login.1 echo look.1 sed 's/.//' >look.1 <<'//GO.SYSIN DD look.1' -.TH LOOK 1 -.SH NAME -look \- find lines in a sorted list -.SH SYNOPSIS -.B look -[ -.B \-df -] -string -[ file ] -.SH DESCRIPTION -.I Look -consults a sorted -.I file -and prints all lines that begin with -.IR string . -It uses binary search. -.PP -The options -.B d -and -.B f -affect comparisons as in -.IR sort (1): -.TP 4 -.B d -`Dictionary' order: -only letters, digits, -tabs and blanks participate in comparisons. -.TP 4 -.B f -Fold. -Upper case letters compare equal to lower case. -.PP -If no -.I file -is specified, -.I /usr/dict/words -is assumed with collating sequence -.B \-df. -.SH FILES -/usr/dict/words -.SH "SEE ALSO" -sort(1), grep(1) //GO.SYSIN DD look.1 echo lookall.1 sed 's/.//' >lookall.1 <<'//GO.SYSIN DD lookall.1' -.TH LOOKALL 1 -.SH NAME -lookall \- look through all text files on UNIX -.SH SYNOPSIS -.B lookall -[ -.BI \-C n -] -.SH DESCRIPTION -.I Lookall -accepts keywords from the standard input, performs -a search similar to that of -.IR refer (1), -and writes the result on the standard output. -.I Lookall -consults, however, an index to all the text files on -the system rather than just bibliographies. -Only the first 50 -words of each file (roughly) were used to -make the indexes. -Blank lines are taken as delimiters between queries. -.PP -The -.BI -C n -option -specifies a coordination level search: up to -.IR n -keywords may be missing -from the answers, and the answers are listed -with those containing the most keywords first. -.PP -The command sequence in -.I /usr/dict/lookall/makindex -regenerates the index. -.SH FILES -The directory -.I /usr/dict/lookall -contains the index files. -.SH DIAGNOSTICS -`Warning: index precedes file ...' -means that a file has been changed since the index was made -and it may be retrieved (or not retrieved) erroneously. -.SH BUGS -Coordination level searching doesn't work as described: only -those acceptable items with the smallest number of -missing keywords are retreived. //GO.SYSIN DD lookall.1 echo lorder.1 sed 's/.//' >lorder.1 <<'//GO.SYSIN DD lorder.1' -.TH LORDER 1 -.SH NAME -lorder \- find ordering relation for an object library -.SH SYNOPSIS -.B lorder -file ... -.SH DESCRIPTION -The input -is one or more object or library archive (see -.IR ar (1)) -.I files. -The standard output -is a list of pairs of object file names, -meaning that the first file of the pair refers to -external identifiers defined in the second. -The output may be processed by -.IR tsort (1) -to find an ordering of -a library suitable for one-pass access by -.IR ld (1). -.PP -This brash one-liner intends to build a new library -from existing `.o' files. -.IP -ar cr library \`\|lorder *.o | tsort\` -.SH FILES -*symref, *symdef -.br -nm(1), sed(1), sort(1), join(1) -.SH "SEE ALSO" -tsort(1), -ld(1), -ar(1) -.SH BUGS -The names of object files, in and out of libraries, must end with `.o'; -nonsense results otherwise. //GO.SYSIN DD lorder.1 echo ls.1 sed 's/.//' >ls.1 <<'//GO.SYSIN DD ls.1' -.TH LS 1 -.SH NAME -ls \- list contents of directory -.SH SYNOPSIS -.B ls -[ -.B \-ltasdrucifg -] name ... -.SH DESCRIPTION -For each directory argument, -.I ls -lists the contents of the directory; -for each file argument, -.I ls -repeats its name and any other information requested. -The output is sorted alphabetically by default. -When no argument is given, the current directory is listed. -When several arguments are given, -the arguments are first sorted appropriately, -but file arguments appear -before directories and their contents. -There are several options: -.TP -.B \-l -List in long format, giving mode, number of links, owner, -size in bytes, and time of last modification -for each file. -(See below.) -If the file is a special file the size field will instead contain -the major and minor device numbers. -.TP -.B \-t -Sort by time modified (latest first) instead of -by name, as is normal. -.TP -.B \-a -List all entries; usually -.RB ` . ' -and -.RB ` .. ' -are suppressed. -.TP -.B \-s -Give size in blocks, -including indirect blocks, for each entry. -.TP -.B \-d -If argument is a directory, list only its name, not -its contents (mostly used with -.B \-l -to get status -on directory). -.TP -.B \-r -Reverse the order of sort to get reverse alphabetic -or oldest first as appropriate. -.TP -.B \-u -Use time of last access instead of last -modification for sorting -.RB ( \-t ) -or printing -.RB ( \-l ). -.TP -.B \-c -Use time of last modification to inode (mode, etc.) -instead of last modification to file for sorting -.RB ( \-t ) -or printing -.RB ( \-l ). -.TP -.B \-i -Print i-number in first column -of the report for each file listed. -.TP -.B \-f -Force each argument to be interpreted as a directory -and list the name found in each slot. -This option turns off -.B "\-l, \-t, \-s," -and -.B \-r, -and -turns on -.B \-a; -the order is the order in which entries -appear in the directory. -.TP -.B \-g -Give group ID instead of owner ID in long listing. -.PP -The mode printed under the -.B \-l -option contains 11 characters -which are interpreted -as follows: -the first character is -.TP 3 -.B d -if the entry is a directory; -.br -.ns -.TP 3 -.B b -if the entry is a block-type special file; -.br -.ns -.TP 3 -.B c -if the entry is a character-type special file; -.br -.ns -.TP 3 -.B \- -if the entry is a plain file. -.PP -The next 9 characters are interpreted -as three sets of three bits each. -The first set refers to owner permissions; -the next to permissions to others in the same user-group; -and the last to all others. -Within each set the three characters indicate -permission respectively to read, to write, or to -execute the file as a program. -For a directory, `execute' permission is interpreted -to mean permission to search the directory -for a specified file. -The permissions are indicated as follows: -.TP 3 -.B r -if the file is readable; -.br -.ns -.TP 3 -.B w -if the file is writable; -.br -.ns -.TP 3 -.B x -if the file is executable; -.br -.ns -.TP 3 -.B \- -if the indicated permission is not granted. -.PP -The group-execute permission character is given -as -.B s -if the file has set-group-ID mode; -likewise the user-execute permission character is given -as -.B s -if the file has set-user-ID mode. -.PP -The last character of the mode (normally `x' or `\-') is -.B t -if the 1000 bit of the mode is on. -See -.IR chmod (1) -for the meaning of this mode. -.PP -When the sizes of the files in a directory -are listed, a total count of blocks, -including indirect blocks is printed. -.SH FILES -/etc/passwd to get user ID's for -`ls \-l'. -.br -/etc/group to get group ID's for -`ls \-g'. //GO.SYSIN DD ls.1 echo m4.1 sed 's/.//' >m4.1 <<'//GO.SYSIN DD m4.1' -.TH M4 1 -.SH NAME -m4 \- macro processor -.SH SYNOPSIS -.B m4 -[ files ] -.SH DESCRIPTION -.I M4 -is a macro processor -intended as a front end for Ratfor, C, and other languages. -Each of the argument files is processed in order; -if there are no arguments, or if an argument is `\-', -the standard input is read. -The processed text is written on the standard output. -.PP -Macro calls -have the form -.PP - name(arg1,arg2, . . . , argn) -.br -.PP -The `(' must immediately follow the name of the macro. -If a defined macro name is not followed by a `(', -it is deemed to have no arguments. -Leading unquoted blanks, tabs, and newlines are ignored while collecting arguments. -Potential macro names consist of alphabetic letters, -digits, and underscore `\_', where the first character is not a digit. -.PP -Left and right single quotes (\`\|\') are used to quote strings. -The value of a quoted string is the string stripped of the quotes. -.PP -When a macro name is recognized, -its arguments are collected by searching for a matching right -parenthesis. -Macro evaluation proceeds normally during the collection of the arguments, -and any commas or right parentheses -which happen to turn up within the value of a nested -call are as effective as those in the original input text. -After argument collection, -the value of the macro is pushed back onto the input stream -and rescanned. -.PP -.I M4 -makes available the following built-in macros. -They may be redefined, but once this is done the original meaning is lost. -Their values are null unless otherwise stated. -.TP 10 -define -The second argument is installed as the value of the macro -whose name is the first argument. -Each occurrence of $\fIn\fR in the replacement text, -where -.I n -is a digit, -is replaced by the -.IR n -th -argument. -Argument 0 is the name of the macro; -missing arguments are replaced by the null string. -.TP -undefine -removes the definition of the macro named in its argument. -.TP -ifdef -If the first argument is defined, the value is the second argument, otherwise the third. -If there is no third argument, the value is null. -The word -.I unix -is predefined on UNIX versions of -.IR m4 . -.TP -changequote -Change quote characters to the first and second arguments. -.I Changequote -without arguments restores the original values -(i.e., \`\|\'). -.TP -divert -.I M4 -maintains 10 output streams, -numbered 0-9. -The final output is the concatenation of the streams -in numerical order; -initially stream 0 is the current stream. -The -.I divert -macro changes the current output stream to its (digit-string) -argument. -Output diverted to a stream other than 0 through 9 -is discarded. -.TP -undivert -causes immediate output of text from diversions named as -arguments, or all diversions if no argument. -Text may be undiverted into another diversion. -Undiverting discards the diverted text. -.TP -divnum -returns the value of the current output stream. -.TP -dnl -reads and discards characters up to and including the next newline. -.TP -ifelse -has three or more arguments. -If the first argument is the same string as the second, -then the value is the third argument. -If not, and if there are more than four arguments, the process is repeated with arguments 4, 5, 6 and 7. -Otherwise, the value is either the fourth string, or, if it is not present, -null. -.TP -incr -returns the value of its argument incremented by 1. -The value of the argument is calculated -by interpreting an initial digit-string as a decimal number. -.TP -eval -evaluates its argument as an arithmetic expression, using 32-bit arithmetic. -Operators include +, \-, \(**, /, %, ^ (exponentiation); relationals; parentheses. -.TP -len -returns the number of characters in its argument. -.TP -index -returns the position in its first argument where the second argument begins (zero origin), -or \-1 if the second argument does not occur. -.TP -substr -returns a substring of its first argument. -The second argument is a zero origin -number selecting the first character; -the third argument indicates the length of the substring. -A missing third argument is taken to be large enough to extend to -the end of the first string. -.TP -translit -transliterates the characters in its first argument -from the set given by the second argument to the set given by the third. -No abbreviations are permitted. -.TP -include -returns the contents of the file named in the argument. -.TP -sinclude -is identical to -.I include, -except that it -says nothing if the file is inaccessible. -.TP -syscmd -executes the UNIX command given in the first argument. -No value is returned. -.TP -maketemp -fills in a string of XXXXX in its argument with the current process id. -.TP -errprint -prints its argument -on the diagnostic output file. -.TP -dumpdef -prints current names and definitions, -for the named items, or for all if no arguments are given. -.dt -.SH "SEE ALSO" -B. W. Kernighan and D. M. Ritchie, -.I The M4 Macro Processor //GO.SYSIN DD m4.1 echo mail.1 sed 's/.//' >mail.1 <<'//GO.SYSIN DD mail.1' -.TH MAIL 1 -.SH NAME -mail \- send or receive mail among users -.SH SYNOPSIS -.B mail -person ... -.br -.B mail -[ -.B \-r -] [ -.B \-q -] [ -.B \-p -] [ -.B \-f -file -] -.LP -.SH DESCRIPTION -.I Mail -with no argument -prints -a user's mail, -message-by-message, -in last-in, first-out order; -the optional argument -.B \-r -causes first-in, first-out order. -If the -.B \-p -flag is given, the mail is printed with no questions asked; -otherwise, -for each message, -.I mail -reads a line from the standard input -to direct disposition of the message. -.TP -newline -Go on to next message. -.TP -d -Delete message and go on to the next. -.TP -p -Print message again. -.TP -\- -Go back to previous message. -.TP -.RI "s [" " file " "] ..." -Save the message in the named -.I files -(`mbox' default). -.TP -.RI "w [" " file " "] ..." -Save the message, without a header, in the named -.I files -(`mbox' default). -.TP -.RI "m [" " person " "] ..." -Mail the message to the named -.I persons -(yourself is default). -.TP -EOT (control-D) -Put unexamined mail back in the mailbox and stop. -.TP -q -Same as EOT. -.TP -x -Exit, without changing the mailbox file. -.TP -!command -Escape to the Shell to do command. -.TP -? -Print a command summary. -.PP -An interrupt stops the printing of the current letter. -The optional argument -.B \(miq -causes -.I mail -to exit after interrupts -without changing the mailbox. -.PP -When -.I persons -are named, -.I mail -takes the standard input up to an end-of-file -(or a line with just `.') -and adds it to each -.I person's -`mail' file. -The message is preceded by the sender's name and a postmark. -Lines that look like postmarks are -prepended with `>'. -A -.I person -is usually a user name recognized by -.IR login (1). -To denote a recipient on a remote system, prefix -.I person -by the system name and exclamation mark (see -.IR uucp (1)). -.PP -The -.B \-f -option causes the named file, e.g. `mbox', -to be printed as if it were the mail file. -.PP -Each user owns his own mailbox, which is by default generally -readable but not writable. -The command does not delete an empty mailbox nor change its mode, -so a user may make it unreadable if desired. -.PP -When a user logs in he is informed of the presence -of mail. -.SH FILES -/usr/spool/mail/* mailboxes -.br -/etc/passwd to identify sender and locate persons -.br -mbox saved mail -.br -/tmp/ma* temp file -.br -dead.letter unmailable text -.br -uux(1) -.SH "SEE ALSO" -xsend(1), write(1), uucp(1) -.SH BUGS -There is a locking mechanism intended to prevent -two senders from accessing the same mailbox, but it -is not perfect and races -are possible. //GO.SYSIN DD mail.1 echo make.1 sed 's/.//' >make.1 <<'//GO.SYSIN DD make.1' -.TH MAKE 1 -.SH NAME -make \- maintain program groups -.SH SYNOPSIS -.B make -[ -.B \-f -makefile ] [ option ] ... -file ... -.SH DESCRIPTION -.I Make -executes commands in -.I makefile -to update -one or more target -.IR names . -.I Name -is typically a program. -If no -.B \-f -option is present, `makefile' and `Makefile' are -tried in order. -If -.I makefile -is `\-', the standard input is taken. -More than one -.B \-f -option may appear -.PP -.I Make -updates a target if it depends on prerequisite files -that have been modified since the target was last modified, -or if the target does not exist. -.PP -.I Makefile -contains a sequence of entries that specify dependencies. -The first line of an entry is a -blank-separated list of targets, then a colon, -then a list of prerequisite files. -Text following a semicolon, and all following lines -that begin with a tab, are shell commands -to be executed to update the target. -.PP -Sharp and newline surround comments. -.PP -The following makefile says that `pgm' depends on two -files `a.o' and `b.o', and that they in turn depend on -`.c' files and a common file `incl'. -.RS -.HP -.PD 0 -.nf -pgm: a.o b.o -cc a.o b.o \-lm \-o pgm -.HP -a.o: incl a.c -cc \-c a.c -.HP -b.o: incl b.c -cc \-c b.c -.fi -.RE -.PD -.PP -.I Makefile -entries of the form -.PP -.IP -string1 = string2 -.PP -are macro definitions. -Subsequent appearances of -.I $(string1) -are replaced by -.IR string2 . -If -.I string1 -is a single character, the parentheses are optional. -.PP -.I Make -infers prerequisites for files for which -.I makefile -gives no construction commands. -For example, a -`.c' file may be inferred as prerequisite for a `.o' file -and be compiled to produce the `.o' file. -Thus the preceding example can be done more briefly: -.RS -.HP -.PD 0 -.nf -pgm: a.o b.o -cc a.o b.o \-lm \-o pgm -.HP -a.o b.o: incl -.fi -.RE -.PD -.PP -Prerequisites are inferred according to selected suffixes -listed as the `prerequisites' for the special name `.SUFFIXES'; -multiple lists accumulate; -an empty list clears what came before. -Order is significant; the first possible name for which both -a file and a rule as described in the next paragraph exist -is inferred. -The default list is -.IP -\&.SUFFIXES: .out .o .c .e .r .f .y .l .s -.PP -The rule to create a file with suffix -.I s2 -that depends on a similarly named file with suffix -.I s1 -is specified as an entry -for the `target' -.IR s1s2 . -In such an entry, the special macro $* stands for -the target name with suffix deleted, $@ for the full target name, -$< for the complete list of prerequisites, -and -$? for the list of prerequisites that are out of date. -For example, a rule for making -optimized `.o' files from `.c' files is -.IP -\&.c.o: ; cc \-c \-O \-o $@ $*.c -.PP -Certain macros are used by the default inference rules -to communicate optional arguments to -any resulting compilations. -In particular, `CFLAGS' is used for -.I cc -and -.IR f77 (1) -options, `LFLAGS' and `YFLAGS' for -.I lex -and -.IR yacc (1) -options. -.PP -Command lines are executed one at a time, each by its -own shell. -A line is printed when it is executed unless -the special target `.SILENT' -is in -.I makefile, -or the first character of the command is `@'. -.PP -Commands returning nonzero status (see -.IR intro (1)) -cause -.I make -to terminate unless -the special target `.IGNORE' is in -.I makefile -or the command begins with -. -.PP -Interrupt and quit cause the target to be deleted -unless the target depends on the special name `.PRECIOUS'. -.PP -Other options: -.TP -.B \-i -Equivalent to the special entry `.IGNORE:'. -.TP -.B \-k -When a command returns nonzero status, -abandon work on the current entry, but -continue on branches that do not depend on the current entry. -.TP -.B \-n -Trace and print, but do not execute the commands -needed to update the targets. -.TP -.B \-t -Touch, i.e. update the modified date of targets, without -executing any commands. -.TP -.B \-r -Equivalent to an initial special entry `.SUFFIXES:' -with no list. -.TP -.B \-s -Equivalent to the special entry -`.SILENT:'. -.SH FILES -makefile, Makefile -.br -.SH "SEE ALSO" -sh(1), touch(1) -.br -S. I. Feldman -.I -Make \- A Program for Maintaining Computer Programs -.SH BUGS -Some commands return nonzero status inappropriately. -Use -.B \-i -to overcome the difficulty. -.br -Commands that are directly executed by the shell, -notably -.IR cd (1), -are ineffectual across newlines in -.I make. //GO.SYSIN DD make.1 echo man.1 sed 's/.//' >man.1 <<'//GO.SYSIN DD man.1' -.TH MAN 1 -.SH NAME -man \- print sections of this manual -.SH SYNOPSIS -.B man -[ option ... ] [ chapter ] title ... -.SH DESCRIPTION -.I Man -locates and prints the section of this manual named -.I title -in the specified -.IR chapter . -(In this context, the word `page' is often used as a synonym for `section'.)\ -The -.I title -is entered in lower case. -The -.I chapter -number does not need a letter suffix. -If no -.I chapter -is specified, the whole manual is searched for -.I title -and all occurrences of it are printed. -.PP -.I Options -and their meanings are: -.TP -.B \-t -Phototypeset the section using -.IR troff (1). -.TP -.B \-n -Print the section on the standard output using -.IR nroff (1). -.TP -.B \-k -Display the output on a Tektronix 4014 terminal using -.IR troff (1) -and -.IR tc (1). -.TP -.B \-e -Appended or prefixed to any of the above -causes the manual section to be preprocessed by -.I neqn -or -.IR eqn (1); -.B \-e -alone means -.BR \-te . -.TP -.B \-w -Print the path names of the manual sections, -but do not print the sections themselves. -.TP -(default) -Copy an already formatted manual section to the terminal, -or, if none is available, act as -.BR \-n . -It may be necessary to use a filter to adapt the output to -the -particular terminal's characteristics. -.PP -Further -.I options, -e.g. to specify the kind of terminal you have, -are passed on to -.IR troff (1) -or -.IR nroff . -.I Options -and -.I chapter -may be changed before each -.IR title . -.PP -For example: -.IP -man man -.PP -would reproduce this section, -as well as any other sections named -.I man -that may exist in other chapters of the manual, e.g. -.IR man (7). -.SH FILES -/usr/man/man?/\(** -.br -/usr/man/cat?/\(** -.SH "SEE ALSO" -nroff(1), -eqn(1), -tc(1), -man(7) -.SH BUGS -The manual is supposed to be reproducible either on -a phototypesetter or on a terminal. -However, on a terminal some information is necessarily lost. //GO.SYSIN DD man.1 echo mesg.1 sed 's/.//' >mesg.1 <<'//GO.SYSIN DD mesg.1' -.TH MESG 1 -.SH NAME -mesg \- permit or deny messages -.SH SYNOPSIS -.B mesg -[ -.B n -] [ -.B y -] -.SH DESCRIPTION -.I Mesg -with argument -.B n -forbids messages via -.IR write (1) -by revoking non-user -write permission on the user's terminal. -.I Mesg -with argument -.B y -reinstates permission. -All by itself, -.I mesg -reports the current state without changing it. -.SH FILES -/dev/tty* -.br -/dev -.SH "SEE ALSO" -write(1) -.SH DIAGNOSTICS -Exit status is 0 if messages are receivable, -1 if not, 2 on error. //GO.SYSIN DD mesg.1 echo mkconf.1m sed 's/.//' >mkconf.1m <<'//GO.SYSIN DD mkconf.1m' -.TH MKCONF 1M -.SH NAME -mkconf \- generate configuration tables -.SH SYNOPSIS -mkconf -.SH DESCRIPTION -.I Mkconf -examines a machine configuration table on its -standard input. -Its output is a pair of files -.I l.s -and -.I c.c. -The first is an assembler program that represents the interrupt vectors -located in low memory addresses; -the second contains initialized -block and character device switch tables. -.PP -Input to -.I mkconf -is a sequence of lines. -The following describe devices on the machine: -.PP -.RS 5 -.nf -.DS -pc (PC11) -lp (LP11) -rf (RS11) -hs (RS03/RS04) -tc (TU56) -rk (RK03/RK05) -tm (TU10) -rp (RP03) -hp (RP04/5/6) -ht (TU16) -dc* (DC11) -kl* (KL11/DL11-ABC) -dl* (DL11-E) -dp* (DP11) -dn* (DN11) -dh* (DH11) -dhdm* (DM11-BB) -du* (DU11) -.RE -.fi -.PP -The devices marked with * may be preceded by a number telling -how many are to be included. -The console typewrite is automatically included; -don't count it as part of the KL or DL specification. -Count DN's in units of 4 (1 system unit). -.PP -The following lines are also accepted. -.TP 5 -.BI "root " "dev minor" -The specified block device (e.g. -.BR hp ) -is used for the root. -.I minor -is a decimal number giving the minor device. -This line must appear exactly once. -.TP 5 -.BI "swap " "dev minor" -The specified block device is used for swapping. -If not given the root is used. -.TP 5 -.BI "pipe " "dev minor" -The specified block device -is used to store pipes. -If not given the root is used. -.TP 5 -.BI "swplo " number -.TP 5 -.BI "nswap " number -Sets the origin (block number) and size of the area used for -swapping. -By default, the not very useful numbers -4000 and 872. -.TP 5 -.B pack -Include the packet driver. -By default it is left out. -.TP 5 -.B mpx -Include the multiplexor driver. -By default it is left out. -.SH FILES -l.s, c.c output files -.SH SEE ALSO -`Setting up Unix', in Volume 2. -.SH BUGS -The set of devices it knows about, the set of drivers included, -and the set of devices on the machine -are mutually incomparable. -Some handwork is certain to be necessary. -Because of floating vectors that may have been missed, -It is mandatory to check the -.I l.s -file to make sure it corresponds with reality. //GO.SYSIN DD mkconf.1m echo mkdir.1 sed 's/.//' >mkdir.1 <<'//GO.SYSIN DD mkdir.1' -.TH MKDIR 1 -.SH NAME -mkdir \- make a directory -.SH SYNOPSIS -.B mkdir -dirname ... -.SH DESCRIPTION -.I Mkdir -creates specified directories -in mode 777. -Standard entries, -.RB ` . ', -for the directory itself, -and -.BR ` .. ' -for its parent, are made automatically. -.PP -.I Mkdir -requires write permission in the parent directory. -.SH "SEE ALSO" -rm(1) -.SH DIAGNOSTICS -.I Mkdir -returns exit code 0 if all directories were successfully made. -Otherwise it prints a diagnostic and returns nonzero. //GO.SYSIN DD mkdir.1 echo mkfs.1m sed 's/.//' >mkfs.1m <<'//GO.SYSIN DD mkfs.1m' -.TH MKFS 1M -.SH NAME -mkfs \- construct a file system -.SH SYNOPSIS -.B /etc/mkfs -special -proto -.SH DESCRIPTION -.I Mkfs -constructs a file system -by writing on the special file -.I special -according to the directions -found in -the prototype file -.I proto. -The prototype file -contains tokens separated by spaces or -new lines. -The first token is the name of a file -to be copied onto block zero as -the bootstrap program, -see -.IR bproc (8). -The second token is a number specifying the -size of the created file system. -Typically it will be the number of blocks on the device, -perhaps diminished -by space for swapping. -The next token is the number of i-nodes -in the i-list. -The next set of tokens comprise the specification -for the root file. -File specifications consist of tokens -giving the mode, -the user-id, -the group id, -and the initial contents of the file. -The syntax of the contents field -depends on the mode. -.PP -The mode token for a file is a 6 character string. -The first character -specifies the type of the file. -(The characters -.B \-bcd -specify regular, block special, -character special and directory files -respectively.) -The second character of the type -is either -.B u -or -.B \- -to specify set-user-id mode or not. -The third is -.B g -or -.B \- -for the set-group-id mode. -The rest of the mode -is a three digit octal number giving the -owner, group, and other read, write, execute -permissions, see -.IR chmod (1). -.PP -Two decimal number -tokens come after the mode; they specify the -user and group ID's of the owner of the file. -.PP -If the file is a regular file, -the next token is a pathname -whence the contents and size are copied. -.PP -If the file is a block or character special file, -two decimal number tokens -follow which give the major and minor device numbers. -.PP -If the file is a directory, -.I mkfs -makes the entries -.BR . "" -and -.B .. -and then -reads a list of names and -(recursively) -file specifications for the entries -in the directory. -The scan is terminated with the -token -.BR $ . -.PP -If the prototype file cannot be opened and -its name consists of a string of digits, -.I mkfs -builds a file system with a single -empty directory on it. -The size of the file system is the value -of -.I proto -interpreted as a decimal number. -The number of i-nodes is calculated -as a function of the filsystem size. -The boot program is left uninitialized. -.PP -A sample prototype specification follows: -.PP -.nf -.in +5 -/usr/mdec/uboot -4872 55 -d\-\-777 3 1 -usr d\-\-777 3 1 - sh \-\-\-755 3 1 /bin/sh - ken d\-\-755 6 1 - $ - b0 b\-\-644 3 1 0 0 - c0 c\-\-644 3 1 0 0 - $ -$ -.in -5 -.fi -.SH "SEE ALSO" -filsys(5), -dir(5), -bproc(8) -.SH BUGS -There should be some way to specify links. //GO.SYSIN DD mkfs.1m echo mknod.1m sed 's/.//' >mknod.1m <<'//GO.SYSIN DD mknod.1m' -.TH MKNOD 1M -.SH NAME -mknod \- build special file -.SH SYNOPSIS -.B /etc/mknod -name -[ -.B c -] [ -.B b -] -major -minor -.SH DESCRIPTION -.I Mknod -makes a special file. -The first argument is the -.I name -of the entry. -The second is -.B b -if the special file is block-type (disks, tape) or -.B c -if it is character-type (other devices). -The last two arguments are -numbers specifying the -.I major -device type -and the -.I minor -device (e.g. unit, drive, or line number). -.PP -The assignment of major device numbers is specific to each system. -They have to be dug out of the -system source file -.I conf.c. -.SH "SEE ALSO" -mknod(2) //GO.SYSIN DD mknod.1m echo mount.1m sed 's/.//' >mount.1m <<'//GO.SYSIN DD mount.1m' -.TH MOUNT 1M -.SH NAME -mount, umount \- mount and dismount file system -.SH SYNOPSIS -.B /etc/mount -[ special name [ -.B \-r -] ] -.PP -.B /etc/umount -special -.SH DESCRIPTION -.I Mount -announces to the system that a removable file system -is present on the device -.I special. -The file -.I name -must exist already; it -must be a directory (unless the root of the -mounted file system is not a directory). -It becomes the name of the newly mounted root. -The optional last argument indicates that the file system -is to be mounted read-only. -.PP -.I Umount -announces to the system that the removable file system previously -mounted on device -.I special -is to be removed. -.PP -These commands -maintain a table of mounted devices. -If invoked without an argument, -.I mount -prints the table. -.PP -Physically write-protected and magnetic tape file -systems must be mounted read-only -or errors will occur when access times are updated, -whether or not any explicit write is attempted. -.SH FILES -/etc/mtab: mount table -.SH "SEE ALSO" -mount(2), -mtab(5) -.SH BUGS -Mounting file systems full of garbage will crash the system. -.br -Mounting a root directory on a non-directory -makes some apparently good pathnames invalid. //GO.SYSIN DD mount.1m echo mv.1 sed 's/.//' >mv.1 <<'//GO.SYSIN DD mv.1' -.TH MV 1 -.SH NAME -mv \- move or rename files and directories -.SH SYNOPSIS -.B mv -file1 file2 -.PP -.B mv -file ... directory -.SH DESCRIPTION -.I Mv -moves (changes the name of) -.I file1 -to -.IR file2 . -.PP -If -.I file2 -already exists, -it is removed before -.I file1 -is moved. -If -.I file2 -has a mode which forbids writing, -.I mv -prints the mode (see -.IR chmod (2)) -and -reads the standard input to obtain a line; -if the line begins with -.B y, -the move takes place; -if not, -.I mv -exits. -.PP -In the second form, -one or more -.I files -are moved to the -.I directory -with their original -file-names. -.PP -.I Mv -refuses to move a file onto itself. -.SH "SEE ALSO" -cp(1), chmod(2) -.SH BUGS -If -.I file1 -and -.I file2 -lie on different file systems, -.I mv -must copy the file and delete the original. -In this case the owner name becomes -that of the copying process and any -linking relationship with other files -is lost. -.PP -.I Mv -should take -.B \-f -flag, like -.I rm, -to suppress the question -if the target exists and is not writable. //GO.SYSIN DD mv.1 echo ncheck.1m sed 's/.//' >ncheck.1m <<'//GO.SYSIN DD ncheck.1m' -.TH NCHECK 1M -.SH NAME -ncheck \- generate names from i-numbers -.SH SYNOPSIS -.B ncheck -[ -.B \-i -numbers ] [ -.B \-a -] [ -.B \-s -] [ filesystem ] -.SH DESCRIPTION -.I Ncheck -with no argument -generates a pathname vs. i-number -list of all files -on a set of default file systems. -Names of directory files are followed by `/\fB.\fR'. -The -.B \-i -option reduces the report to only those files whose i-numbers follow. -The -.B \-a -option -allows printing of the names -.RB ` . ' -and -.RB ` .. ', -which are ordinarily suppressed. -suppressed. -The -.B \-s -option reduces the report to special files -and files with set-user-ID mode; -it is intended to discover concealed violations -of security policy. -.PP -A file system may be specified. -.PP -The report is in no useful -order, and probably should be sorted. -.SH "SEE ALSO" -dcheck(1), icheck(1), sort(1) -.SH DIAGNOSTICS -When the filesystem structure is improper, -`??' denotes the `parent' of -a parentless file and -a pathname beginning with `...' denotes a loop. //GO.SYSIN DD ncheck.1m echo newgrp.1 sed 's/.//' >newgrp.1 <<'//GO.SYSIN DD newgrp.1' -.TH NEWGRP 1 -.SH NAME -newgrp \- log in to a new group -.SH SYNOPSIS -.B newgrp -group -.SH DESCRIPTION -.I Newgrp -changes the group identification of its caller, -analogously to -.IR login (1). -The same person remains logged in, -and the current directory is unchanged, -but calculations of access permissions to files are -performed with respect to the -new group ID. -.PP -A password is demanded if the group has -a password and the user himself does not. -.PP -When most users log in, they -are members of the group named `other.' -.I Newgrp -is known to the shell, which executes it directly without a fork. -.SH FILES -/etc/group, /etc/passwd -.SH "SEE ALSO" -login(1), group(5) //GO.SYSIN DD newgrp.1 echo nice.1 sed 's/.//' >nice.1 <<'//GO.SYSIN DD nice.1' -.TH NICE 1 -.SH NAME -nice, nohup \- run a command at low priority -.SH SYNOPSIS -.B nice -[ -.BI \- number -] -command [ arguments ] -.PP -.B nohup -command [ arguments ] -.SH DESCRIPTION -.I Nice -executes -.I command -with low scheduling priority. -If the -.I number -argument is present, the priority is incremented (higher -numbers mean lower priorities) by that amount up to a limit of 20. -The default -.I number -is 10. -.PP -The super-user may run commands with -priority higher than normal -by using a negative priority, -e.g. `\-\-10'. -.PP -.I Nohup -executes -.I command -immune to hangup and terminate signals from the controlling terminal. -The priority is incremented by 5. -.I Nohup -should be invoked from the shell with `&' in order to -prevent it from responding to interrupts by or -stealing the input from -the next person who logs in on the same terminal. -.SH FILES -nohup.out standard output and standard error file under -.I nohup -.SH "SEE ALSO" -nice(2) -.SH DIAGNOSTICS -.I Nice -returns the exit status of the subject command. //GO.SYSIN DD nice.1 echo nm.1 sed 's/.//' >nm.1 <<'//GO.SYSIN DD nm.1' -.TH NM 1 -.SH NAME -nm \- print name list -.SH SYNOPSIS -.B nm -[ -.B \-gnopru -] -[ file ... ] -.SH DESCRIPTION -.I Nm -prints the name list (symbol table) of each object -.I file -in the argument list. -If an argument -is an archive, a listing for each object -file in the archive will be produced. -If no -.I file -is given, the symbols in -`a.out' -are listed. -.PP -Each symbol name is preceded by its value (blanks if undefined) -and one of the letters -.SM -.B U -(undefined), -.SM -.B A -(absolute), -.SM -.B T -(text segment symbol), -.SM -.B D -(data segment symbol), -.SM -.B B -(bss segment symbol), -or -.SM -.B C -(common symbol). -If the symbol is local (non-external) the type letter is in -lower case. -The output is sorted alphabetically. -.PP -Options are: -.TP -.B \-g -Print only global (external) symbols. -.TP -.B \-n -Sort numerically rather than alphabetically. -.TP -.B \-o -Prepend file or archive element name to each -output line rather than only once. -.TP -.B \-p -Don't sort; print in symbol-table order. -.TP -.B \-r -Sort in reverse order. -.TP -.B \-u -Print only undefined symbols. -.sh FILES -.SH SEE ALSO -ar(1), ar(5), a.out(5) //GO.SYSIN DD nm.1 echo od.1 sed 's/.//' >od.1 <<'//GO.SYSIN DD od.1' -.TH OD 1 -.SH NAME -od \- octal dump -.SH SYNOPSIS -.B od -[ -.B \-bcdox -] [ file ] [ [ -.B + -]offset[ -.BR ". " "][" -\fBb\fR ] ] -.SH DESCRIPTION -.I Od -dumps -.I file -in -one or more formats -as -selected by the first argument. -If the first argument is missing, -.B \-o -is default. -The meanings of the format argument characters -are: -.TP 3 -.B b -Interpret bytes in octal. -.TP 3 -.B c -Interpret bytes in ASCII. -Certain non-graphic characters appear as C escapes: -null=\e0, -backspace=\eb, -formfeed=\ef, -newline=\en, -return=\er, -tab=\et; -others appear as 3-digit octal numbers. -.TP 3 -.B d -Interpret words in decimal. -.TP 3 -.B o -Interpret words in octal. -.TP 3 -.B x -Interpret words in hex. -.PP -The -.I file -argument specifies which file is to be dumped. -If no file argument is specified, -the standard input is used. -.PP -The offset argument specifies the offset -in the file where dumping is to commence. -This argument is normally interpreted -as octal bytes. -If `\fB.\fR' is appended, the offset is interpreted in -decimal. -If `\fBb\fR' is appended, the offset is interpreted in -blocks of 512 bytes. -If the file argument is omitted, -the offset argument must be preceded -.RB ` + '. -.PP -Dumping continues until end-of-file. -.SH "SEE ALSO" -adb(1) //GO.SYSIN DD od.1 echo passwd.1 sed 's/.//' >passwd.1 <<'//GO.SYSIN DD passwd.1' -.TH PASSWD 1 -.SH NAME -passwd \- change login password -.SH SYNOPSIS -.B passwd -[ name ] -.SH DESCRIPTION -This command changes (or installs) a password -associated with the user -.IR name -(your own name by default). -.PP -The program prompts for the old password and then for the new one. -The caller must supply both. -The new password must be typed twice, to forestall mistakes. -.PP -New passwords must be at least four characters long if they use -a sufficiently rich alphabet and at least six characters long -if monocase. -These rules are relaxed if you are insistent enough. -.PP -Only the owner of the name or the super-user may change a password; -the owner must prove he knows the old password. -.SH FILES -/etc/passwd -.SH "SEE ALSO" -login(1), passwd(5), crypt(3) -.br -Robert Morris and Ken Thompson, -.I Password Security: A Case History //GO.SYSIN DD passwd.1 echo plot.1g sed 's/.//' >plot.1g <<'//GO.SYSIN DD plot.1g' -.TH PLOT 1G -.SH NAME -plot \- graphics filters -.SH SYNOPSIS -.B plot -[ -.BR \-T terminal -[ raster ] ] -.SH DESCRIPTION -These commands read plotting instructions (see -.IR plot (5)) -from the standard input, -and in general -produce plotting instructions suitable for -a particular -.I terminal -on the standard output. -.PP -If no -.I terminal -type is specified, the environment parameter $TERM -(see -.IR environ (5)) -is used. -Known -.I terminals -are: -.TP -4014 -Tektronix 4014 storage scope. -.TP -450 -DASI Hyterm 450 terminal (Diablo mechanism). -.TP -300 -DASI 300 or GSI terminal (Diablo mechanism). -.TP -300S -DASI 300S terminal (Diablo mechanism). -.TP -ver -Versatec D1200A printer-plotter. -This version of -.I plot -places a scan-converted -image in `/usr/tmp/raster' and sends the -result directly to the plotter device rather than to -the standard output. -The optional argument causes a previously -scan-converted file -.I raster -to be sent to the plotter. -.SH FILES -/usr/bin/tek -.br -/usr/bin/t450 -.br -/usr/bin/t300 -.br -/usr/bin/t300s -.br -/usr/bin/vplot -.br -/usr/tmp/raster -.SH "SEE ALSO" -plot(3), plot(5) -.SH BUGS -There is no lockout protection -for /usr/tmp/raster. //GO.SYSIN DD plot.1g echo pr.1 sed 's/.//' >pr.1 <<'//GO.SYSIN DD pr.1' -.TH PR 1 -.SH NAME -pr \- print file -.SH SYNOPSIS -.B pr -[ option ] ... -[ file ] ... -.SH DESCRIPTION -.I Pr -produces a printed listing of one or more -.I files. -The output is separated into pages headed by a date, -the name of the file or a specified header, and the page number. -If there are no file arguments, -.I pr -prints its standard input. -.PP -Options apply to all following files but may be reset -between files: -.TP -.BI \- n -Produce -.IR n -column -output. -.TP -.BI + n -Begin printing with page -.I n. -.TP -.B \-h -Take the next argument as a page header. -.TP -.BI \-w n -For purposes of multi-column output, -take the width of the page to be -.I n -characters instead of the default 72. -.TP -.BI \-l n -Take the length of the page to be -.I n -lines instead of the default 66. -.TP -.B \-t -Do not print the 5-line header or the -5-line trailer normally supplied for each page. -.TP -.BI \-s c -Separate columns by the single character -.I c -instead of by the appropriate amount of white space. -A missing -.I c -is taken to be a tab. -.TP -.B \-m -Print all -.I files -simultaneously, -each in one column, -.PP -Inter-terminal messages via -.IR write (1) -are -forbidden during a -.IR pr . -.SH FILES -/dev/tty? -to suspend messages. -.SH "SEE ALSO" -cat(1) -.SH DIAGNOSTICS -There are no diagnostics when -.I pr -is printing on a terminal. //GO.SYSIN DD pr.1 echo prep.1 sed 's/.//' >prep.1 <<'//GO.SYSIN DD prep.1' -.TH PREP 1 -.SH NAME -prep \- prepare text for statistical processing -.SH SYNOPSIS -.B prep -[ -.B \-dio -] -file ... -.SH DESCRIPTION -.I Prep -reads each -.I file -in sequence -and writes it on the standard output, -one `word' to a line. -A word is a string of alphabetic characters -and imbedded apostrophes, -delimited by space or punctuation. -Hyphented words are broken apart; -hyphens at the end of lines are removed and the -hyphenated parts are joined. -Strings of digits are discarded. -.PP -The following option letters may appear in any order: -.TP -.B \-d -Print the word number (in the input -stream) with each word. -.TP -.B \-i -Take the next -.I file -as an `ignore' file. -These words will not appear in the output. -(They will be counted, for purposes of the -.B \-d -count.) -.TP -.B \-o -Take the next -.I file -as an `only' file. -Only these words will appear in the output. -(All other words will also be counted for -the -.B \-d -count.) -.TP -.B \-p -Include punctuation marks (single nonalphanumeric characters) -as separate output lines. -The punctuation marks are not counted for the -.B \-d -count. -.PP -Ignore and only files contain words, one per line. -.SH SEE ALSO -deroff(1) //GO.SYSIN DD prep.1 echo prof.1 sed 's/.//' >prof.1 <<'//GO.SYSIN DD prof.1' -.TH PROF 1 -.SH NAME -prof \- display profile data -.SH SYNOPSIS -.B prof -[ -.B \-v -] [ -.B \-a -] [ -.B \-l -] [ -.BI \- "low\fR [ \fB\-\fIhigh\fR ]" -] [ file ] -.SH DESCRIPTION -.I Prof -interprets the file -.I mon.out -produced by the -.I monitor -subroutine. -Under default modes, -the symbol table in the -named object file -.I (a.out -default) -is read and correlated with the -.I mon.out -profile file. -For each external symbol, the percentage -of time spent executing between that symbol -and the next -is printed (in decreasing order), -together with the number of times that routine was called -and the number of milliseconds per call. -.PP -If the -.B \-a -option is used, -all symbols are reported rather than -just external symbols. -If the -.B \-l -option -is used, -the output is listed by -symbol value rather than -decreasing percentage. -.PP -If the -.B \-v -option is used, -all printing is suppressed -and a graphic version of the profile -is produced -on the standard output for display by the -.IR plot (1) -filters. -The numbers -.I low -and -.I high, -by default 0 and 100, cause a selected -percentage of the profile to be plotted -with accordingly higher resolution. -.PP -In order for the number of calls to a routine to be tallied, -the -.B \-p -option of -.I cc -must have been given when the file containing the -routine was compiled. -This option also arranges for the -.I mon.out -file to be produced automatically. -.SH FILES -.ta \w'mon.out 'u -mon.out for profile -.br -a.out for namelist -.SH "SEE ALSO" -monitor(3), profil(2), cc(1), plot(1) -.SH BUGS -Beware of quantization errors. //GO.SYSIN DD prof.1 echo ps.1 sed 's/.//' >ps.1 <<'//GO.SYSIN DD ps.1' -.TH PS 1 PDP11 -.SH NAME -ps \- process status -.SH SYNOPSIS -.B ps -[ -.B aklx -] -[ namelist ] -.SH DESCRIPTION -.I Ps -prints certain indicia about active -processes. -The -.B a -option asks for information about all processes with terminals (ordinarily -only one's own processes are displayed); -.B x -asks even about processes with no terminal; -.B l -asks for a long listing. -The short listing contains the process ID, tty letter, -the cumulative execution time of the process and an -approximation to the command line. -.PP -The long listing is columnar and contains -.TP -F -Flags associated with the process. -01: in core; -02: system process; -04: locked in core (e.g. for physical I/O); -10: being swapped; -20: being traced by another process. -.TP -S -The state of the process. -0: nonexistent; -S: sleeping; -W: waiting; -R: running; -I: intermediate; -Z: terminated; -T: stopped. -.TP -UID -The user ID of the process owner. -.TP -PID -The process ID of the process; as in certain cults it is possible to kill a process -if you know its true name. -.TP -PPID -The process ID of the parent process. -.TP -CPU -Processor utilization for scheduling. -.TP -PRI -The priority of the -process; high numbers mean low priority. -.TP -NICE -Used in priority computation. -.TP -ADDR -The core address of the process if resident, -otherwise the disk address. -.TP -SZ -The size in blocks of the core image of the process. -.TP -WCHAN -The event for which the process is waiting or sleeping; -if blank, the process is running. -.TP -TTY -The controlling tty for the process. -.TP -TIME -The cumulative execution time for the process. -.TP TIME -The command and its arguments. -.DT -.PP -A process that has exited and has a parent, but has not -yet been waited for by the parent is marked . -.I Ps -makes an educated guess as to the file name -and arguments given when the process was created -by examining core memory or the swap area. -The method is inherently somewhat unreliable and in any event -a process is entitled to destroy this information, -so the names cannot be counted on too much. -.PP -If the -.B k -option is specified, -the file -.I /usr/sys/core -is used in place of -.IR /dev/mem . -This is used for -postmortem system debugging. -If a second argument is given, -it is taken to be the file containing the system's namelist. -.SH FILES -.ta \w'/usr/sys/core 'u -/unix system namelist -.br -/dev/mem core memory -.br -/usr/sys/core alternate core file -.br -/dev searched to find swap device and tty names -.SH "SEE ALSO" -kill(1) -.SH BUGS -Things can change while -.I ps -is running; the picture it gives is only a close -approximation to reality. -.br -Some data printed for defunct processes is irrelevant //GO.SYSIN DD ps.1 echo pstat.1m sed 's/.//' >pstat.1m <<'//GO.SYSIN DD pstat.1m' -.TH PSTAT 1M -.SH NAME -pstat \- print system facts -.SH SYNOPSIS -.B pstat -[ -.B \-aixptuf -] [ suboptions ] -[ file ] -.SH DESCRIPTION -.I Pstat -interprets the contents of certain system tables. -If -.I file -is given, the tables are sought there, otherwise -in -.I /dev/mem. -The required namelist is taken from -.I /unix. -Options are -.TP \w'WCHAN\ 'u -.B \-a -Under -.BR \-p , -describe all process slots rather than just active ones. -.TP -.B \-i -Print the inode table with the these headings: -.IP LOC -The core location of this table entry. -.PD 0 -.IP FLAGS -Miscellaneous state variables encoded thus: -.RS -.IP L -locked -.IP U -update time -.IR filsys (5)) -must be corrected -.IP A -access time must be corrected -.IP M -file system is mounted here -.IP W -wanted by another process (L flag is on) -.IP T -contains a text file -.IP C -changed time must be corrected -.RE -.IP CNT -Number of open file table entries for this inode. -.IP DEV -Major and minor device number of file system in which -this inode resides. -.IP INO -I-number within the device. -.IP MODE -Mode bits, see -.IR chmod (2). -.IP NLK -Number of links to this inode. -.IP UID -User ID of owner. -.IP SIZ/DEV -Number of bytes in an ordinary file, or -major and minor device of special file. -.PD -.TP -.B \-x -Print the text table with these headings: -.IP LOC -The core location of this table entry. -.PD 0 -.IP FLAGS -Miscellaneous state variables encoded thus: -.RS -.IP T -.IR ptrace (2) -in effect -.IP W -text not yet written on swap device -.IP L -loading in progress -.IP K -locked -.IP w -wanted (L flag is on) -.RE -.PD -.IP DADDR -Disk address in swap, measured in multiples of 512 bytes. -.IP CADDR -Core address, measured in multiples of 64 bytes. -.IP SIZE -Size of text segment, measured in multiples of 64 bytes. -.IP IPTR -Core location of corresponding inode. -.IP CNT -Number of processes using this text segment. -.IP CCNT -Number of processes in core using this text segment. -.PD -.TP -.B \-p -Print process table for active processes with these headings: -.IP LOC -The core location of this table entry. -.PD 0 -.IP S -Run state encoded thus: -.RS -.IP 0 -no process -.IP 1 -waiting for some event -.IP 3 -runnable -.IP 4 -being created -.IP 5 -being terminated -.IP 6 -stopped under trace -.RE -.IP F -Miscellaneous state variables, or-ed together: -.RS -.IP 01 -loaded -.IP 02 -the scheduler process -.IP 04 -locked -.IP 010 -swapped out -.IP 020 -traced -.IP 040 -used in tracing -.IP 0100 -locked in by -.IR lock (2). -.RE -.IP PRI -Scheduling priority, see -.IR nice (2). -.IP SIGNAL -Signals received (signals 1-16 coded in bits 0-15), -.IP UID -Real user ID. -.IP TIM -Time resident in seconds; times over 127 coded as 127. -.IP CPU -Weighted integral of CPU time, for scheduler. -.IP NI -Nice level, -see -.IR nice (2). -.IP PGRP -Process number of root of process group -(the opener of the controlling terminal). -.IP PID -The process ID number. -.IP PPID -The process ID of parent process. -.IP ADDR -If in core, the physical address of the `u-area' of -the process measured in multiples of 64 bytes. -If swapped out, the position in the swap area -measured in multiples of 512 bytes. -.IP SIZE -Size of process image in multiples of 64 bytes. -.IP WCHAN -Wait channel number of a waiting process. -.IP LINK -Link pointer in list of runnable processes. -.IP TEXTP -If text is pure, pointer to location of text table entry. -.IP CLKT -Countdown for -.IR alarm (2) -measured in seconds. -.PD -.TP -.B \-t -Print table for terminals (only DH11 and DL11 handled) -with these headings: -.IP RAW -Number of characters in raw input queue. -.PD 0 -.IP CAN -Number of characters in canonicalized input queue. -.IP OUT -Number of characters in putput queue. -.IP MODE -See -.IR tty (4). -.IP ADDR -Physical device address. -.IP DEL -Number of delimiters (newlines) in canonicalized input queue. -.IP COL -Calculated column position of terminal. -.IP STATE -Miscellaneous state variables encoded thus: -.RS -.IP W -waiting for open to complete -.IP O -open -.IP S -has special (output) start routine -.IP C -carrier is on -.IP B -busy doing output -.IP A -process is awaiting output -.IP X -open for exclusive use -.IP H -hangup on close -.RE -.IP PGRP -Process group for which this is controlling terminal. -.PD -.TP -.B \-u -print information about a user process; -the next argument is its address as given -by -.IR ps (1). -The process must be in main memory, or the file used can -be a core image and the address 0. -.TP -.B \-f -Print the open file table with these headings: -.IP LOC -The core location of this table entry. -.PD 0 -.IP FLG -Miscellaneous state variables encoded thus: -.RS -.IP R -open for reading -.IP W -open for writing -.IP P -pipe -.RE -.IP CNT -Number of processes that know this open file. -.IP INO -The location of the inode table entry for this file. -.IP OFFS -The file offset, see -.IR lseek (2). -.PD -.PP -.SH FILES -.ta \w'/dev/mem 'u -/unix namelist -.br -/dev/mem default source of tables -.SH SEE ALSO -ps(1), stat(2), filsys(5) -.br -K. Thompson, -.I UNIX Implementation //GO.SYSIN DD pstat.1m echo ptx.1 sed 's/.//' >ptx.1 <<'//GO.SYSIN DD ptx.1' -.TH PTX 1 -.SH NAME -ptx \- permuted index -.SH SYNOPSIS -.B ptx -[ option ] ... -[ input [ output ] ] -.SH DESCRIPTION -.I Ptx -generates a permuted index to file -.I input -on file -.I output -(standard input and output default). -It has three phases: the first does the permutation, generating -one line for each keyword in an input line. -The keyword is rotated to the front. -The permuted file is then -sorted. -Finally, the sorted lines are rotated so the keyword -comes at the middle of the page. -.I Ptx -produces output in the form: -.br -.IP -\&.xx "tail" "before keyword" "keyword and after" "head" -.LP -where .xx may be an -.I nroff -or -.IR troff (1) -macro -for user-defined formatting. -The -.I before keyword -and -.I keyword and after -fields incorporate as much of the line as will fit -around the keyword when it is printed at the middle of the page. -.I Tail -and -.I head, -at least one of which is an empty string "", -are wrapped-around pieces small enough to fit -in the unused space at the opposite end of the line. -When original text must be discarded, `/' marks the spot. -.PP -The following options can be applied: -.TP -.BR \-f -Fold upper and lower case letters for sorting. -.TP -.BR \-t -Prepare the output for the phototypesetter; -the default line length is 100 characters. -.TP -.BI \-w " n" -Use the next argument, -.I n, -as the width of the output line. -The default line length is 72 characters. -.TP -.BI \-g " n" -Use the next argument, -.I n, -as the number of characters to allow for each gap -among the four parts of the line as finally printed. -The default gap is 3 characters. -.TP -.BR \-o " only" -Use as keywords only the words given in the \fIonly\fR file. -.TP -.BR \-i " ignore" -Do not use as keywords any words given in the -.I -ignore -file. -If the \fB-\fIi\fR and \fB-\fIo\fR options are missing, use /usr/lib/eign -as the -.I -ignore -file. -.TP -.BR \-b " break" -Use the characters in the -.I -break -file to separate words. -In any case, tab, newline, and space characters are always used as break characters. -.TP -.BR \-r -Take any leading nonblank characters of each input line to -be a reference identifier (as to a page or chapter) -separate from the text of the line. -Attach that identifier as a 5th field on each output line. -.PP -The index for this manual was generated using -.I ptx. -.SH FILES -/bin/sort -.br -/usr/lib/eign -.SH BUGS -Line length counts do not account for overstriking or -proportional spacing. -.br //GO.SYSIN DD ptx.1 echo pubindex.1 sed 's/.//' >pubindex.1 <<'//GO.SYSIN DD pubindex.1' -.TH PUBINDEX 1 local -.SH NAME -pubindex \- make inverted bibliographic index -.SH SYNOPSIS -.B pubindex -[ file ] ... -.SH DESCRIPTION -.I Pubindex -makes a hashed inverted index to -the named -.I files -for use by -.IR refer (1). -The -.I files -contain bibliographic references separated by blank lines. -A bibliographic reference is a set of lines -that contain bibliographic information fields. -Each field starts on a line beginning with a `%', followed -by a key-letter, followed by a blank, and followed by the -contents of the field, which continues until the next line -starting with `%'. -The most common key-letters and the corresponding fields are: -.IP -.nf -A Author name -B Title of book containing article referenced -C City -D Date -d Alternate date -E Editor of book containing article referenced -G Government (CFSTI) order number -I Issuer (publisher) -J Journal -K Other keywords to use in locating reference -M Technical memorandum number -N Issue number within volume -O Other commentary to be printed at end of reference -P Page numbers -R Report number -r Alternate report number -T Title of article, book, etc. -V Volume number -X Commentary unused by \fIpubindex\fR -.fi -.PP -Except for `A', each field should only be given once. -Only relevant fields should be supplied. -An example is: -.IP -.nf -%T 5-by-5 Palindromic Word Squares -%A M. D. McIlroy -%J Word Ways -%V 9 -%P 199-202 -%D 1976 -.fi -.SH FILES -.I "x.ia, x.ib, x.ic" -where -.I x -is the first argument. -.SH SEE ALSO -refer(1) //GO.SYSIN DD pubindex.1 echo pwd.1 sed 's/.//' >pwd.1 <<'//GO.SYSIN DD pwd.1' -.TH PWD 1 -.SH NAME -pwd \- working directory name -.SH SYNOPSIS -.B pwd -.SH DESCRIPTION -.I Pwd -prints the pathname of the working (current) directory. -.SH "SEE ALSO" -cd(1) //GO.SYSIN DD pwd.1 echo quot.1m sed 's/.//' >quot.1m <<'//GO.SYSIN DD quot.1m' -.TH QUOT 1M -.SH NAME -quot \- summarize file system ownership -.SH SYNOPSIS -.B quot -[ option ] ... -[ filesystem ] -.SH DESCRIPTION -.I Quot -prints the number of blocks in the named -.I filesystem -currently owned by each user. -If no -.I filesystem -is named, a default name is assumed. -The following options are available: -.TP -.B \-n -Cause the pipeline -.B "ncheck filesystem | sort +0n | quot \-n filesystem -to produce a list of all files and their owners. -.TP -.B \-c -Print three columns giving file size in blocks, number of -files of that size, and cumulative total of blocks -in that size or smaller file. -.TP -.B \-f -Print count of number of files as well as space owned by each user. -.SH FILES -Default file system varies with system. -.br -/etc/passwd to get user names -.SH "SEE ALSO" -ls(1), du(1) -.SH BUGS -Holes in files are counted as if they actually occupied space. //GO.SYSIN DD quot.1m echo ranlib.1 sed 's/.//' >ranlib.1 <<'//GO.SYSIN DD ranlib.1' -.TH RANLIB 1 -.SH NAME -ranlib \- convert archives to random libraries -.SH SYNOPSIS -.B ranlib -archive ... -.SH DESCRIPTION -.I Ranlib -converts each -.I archive -to a form which can be loaded -more rapidly by the loader, -by adding a table of contents named -.B __.SYMDEF -to the beginning of the archive. -It uses -.IR ar (1) -to reconstruct the archive, -so that sufficient temporary file space must -be available in the file system containing the -current directory. -.SH SEE ALSO -ld(1), ar(1) -.SH BUGS -Because generation of a library by -.I ar -and randomization by -.I ranlib -are separate, -phase errors are possible. -The loader -.I ld -warns when the modification date of -a library is more recent than -the creation of its dictionary; -but this means you get the warning even if you -only copy the library. //GO.SYSIN DD ranlib.1 echo ratfor.1 sed 's/.//' >ratfor.1 <<'//GO.SYSIN DD ratfor.1' -.TH RATFOR 1 -.SH NAME -ratfor \- rational Fortran dialect -.SH SYNOPSIS -.B ratfor -[ option ... ] -[ filename ... ] -.SH DESCRIPTION -.I Ratfor -converts a rational dialect of Fortran into ordinary irrational Fortran. -.I Ratfor -provides control flow constructs essentially identical to those in C: -.TP -statement grouping: -.nf -{ statement; statement; statement } -.TP -decision-making: -if (condition) statement [ else statement ] -.br -switch (integer value) { - case integer: statement - ... - [ default: ] statement -} -.TP -loops: -while (condition) statement -for (expression; condition; expression) statement -do limits statement -repeat statement [ until (condition) ] -break [n] -next [n] -.LP -and some syntactic sugar to make programs easier to read and write: -.TP -free form input: -multiple statements/line; automatic continuation -.TP -comments: -# this is a comment -.TP -translation of relationals: ->, >=, etc., become .GT., .GE., etc. -.TP -return (expression) -returns expression to caller from function -.TP -define: -define name replacement -.TP -include: -include filename -.PP -.fi -The option -.B \-h -causes quoted strings to be turned into -27H constructs. -.B \-C -copies comments to the output, and attempts -to format it neatly. -Normally, continuation lines are marked with a & -in column 1; -the option -.B \-6x -makes the continuation character -.B x -and places it in column 6. -.PP -.I Ratfor -is best used with -.IR f77 (1). -.SH "SEE ALSO" -f77(1) -.br -B. W. Kernighan and P. J. Plauger, -.IR "Software Tools" , -Addison-Wesley, 1976. //GO.SYSIN DD ratfor.1 echo refer.1 sed 's/.//' >refer.1 <<'//GO.SYSIN DD refer.1' -.TH REFER 1 -.SH NAME -refer, lookbib \- find and insert literature references in documents -.SH SYNOPSIS -.B refer -[ option ] ... -.PP -.B lookbib -[ file ] ... -.SH DESCRIPTION -.I Lookbib -accepts keywords from the standard input -and searches a bibliographic data base for references -that contain those keywords anywhere in title, author, -journal name, etc. -Matching references are printed on the standard output. -Blank lines are taken as delimiters between queries. -.PP -.I Refer -is a preprocessor for -.I nroff -or -.IR troff (1) -that finds and formats references. -The input files (standard input default) are copied to the standard output, -except for lines between .[ and .] -command lines, which are assumed to contain keywords as for -.I lookbib, -and are replaced by information from the bibliographic data base. -The user may avoid the search, override fields from it, or -add new fields. -The reference data, from whatever source, are assigned to a set of -.I troff -strings. -Macro packages such as -.IR ms (7) -print the finished reference text from these strings. -A flag is placed in the text at the point of reference; -by default the references are indicated by numbers. -.br -.sp -The following options are available: -.TP 6 -.BI \-a r -Reverse the first -.I r -author names (Jones, J. A. instead of J. A. Jones). -If -.I r -is omitted all author names are reversed. -.ns -.TP -.B \-b -Bare mode: do not put any flags in text (neither numbers nor labels). -.ns -.TP -.BI \-c string -Capitalize (with C\s-2APS\s0 S\s-2MALL\s+2 C\s-2APS\s0) -the fields whose key-letters are in -.IR string . -.ns -.TP -.B \-e -Instead of leaving the references where encountered, -accumulate them -until a sequence of the form -.nf - .[ - $LIST$ - .] -.fi -is encountered, and then write out all references -collected so far. Collapse references to the same source. -.ns -.TP -.BI \-k x -Instead of numbering references, use labels as specified in -a -reference data line -beginning -.I %x; -by default -.I x -is -.B L. -.ns -.TP -.BI \-l m , n -Instead of numbering references, use labels made from -the senior author's last name and the year of publication. -Only the first -.I m -letters of the last name -and the last -.I n -digits of the date are used. -If either -.I m -or -.BI , n -is omitted the entire name or date respectively is used. -.ns -.TP -.B \-p -Take the next argument as a file of -references to be searched. -The default file is searched last. -.ns -.TP -.B \-n -Do not search the default file. -.ns -.TP -.BI \-s keys -Sort references by fields whose key-letters are in -the -.I keys -string; -permute -reference numbers in text accordingly. -Implies -.BR \-e . -The key-letters in -.I keys -may be followed by a number to indicate how many such fields -are used, with -.B + -taken as a very large number. -The default is -.B AD -which sorts on the senior author and then date; to sort, for example, -on all authors and then title use -.BR -sA+T . -.PP -To use your own references, put them in the format -described in -.IR pubindex (1) -They can be searched -more rapidly by running -.IR pubindex (1) -on them before using -.I refer; -failure to index results in a linear search. -.PP -When -.I refer -is used with -.I eqn, -.I neqn -or -.I tbl, -.I refer -should be first, to minimize the volume -of data passed through -pipes. -.SH FILES -.I /usr/dict/papers -directory of default publication lists and indexes -.br -.I /usr/lib/refer -directory of programs -.SH SEE ALSO -.br //GO.SYSIN DD refer.1 echo restor.1m sed 's/.//' >restor.1m <<'//GO.SYSIN DD restor.1m' -.TH RESTOR 1M -.SH NAME -restor \- incremental file system restore -.SH SYNOPSIS -.I restor -key [ argument ... ] -.SH DESCRIPTION -.I Restor -is used to read magtapes dumped with the -.I dump -command. -The -.I key -specifies what is to be done. -.I Key -is one of the characters -.B rRxt -optionally combined with -.BR f . -.TP -.B f -Use the first -.I argument -as the name of the tape instead -of the default. -.TP -.B r or R -The tape -is read and loaded into the file system -specified in -.I argument. -This should not be done lightly (see below). -If the key is -.B R -.I restor -asks which tape of a multi volume set to start on. -This allows restor to be interrupted and then -restarted (an -.I icheck \-s must be done before restart). -.TP -.B x -Each file on the -tape named by an -.I argument -is extracted. -The file name has all `mount' prefixes removed; -for example, /usr/bin/lpr is named /bin/lpr on the tape. -The file extracted is placed in a file with a numeric name -supplied by -.I restor -(actually the inode number). -In order to keep the amount of tape read to a minimum, -the following procedure is recommended: -.sp -Mount volume 1 of the set of dump tapes. -.sp -Type the -.I restor -command. -.sp -.I Restor -will announce whether or not it found the files, -give the number it will name the file, and rewind the tape. -.sp -It then -asks you to `mount the desired tape volume'. -Type the number of the volume you choose. -On a -multivolume dump the recommended procedure is to mount the -last through the first volume in that order. -.I Restor -checks to see if any of the files requested are on the -mounted tape (or a later tape, thus the reverse order) and doesn't -read through the tape if no files are. -If you are working with a single volume dump or the number of files -being restored is large, respond to the query with `1' and -.I restor -will read the tapes in sequential order. -.sp -If you have a hierarchy to restore you can use dumpdir(1) -to produce the list of names and a shell script to move -the resulting files to their homes. -.TP -.B t -Print the date the tape was written and the date -the filesystem was dumped from. -.PP -The -.B r -option should only be used to restore -a complete dump tape onto a clear file system -or to restore an incremental dump tape onto this. -Thus -.PP - /etc/mkfs /dev/rp0 40600 -.br - restor r /dev/rp0 -.PP -is a typical sequence to restore a complete dump. -Another -.I restor -can be done to get an incremental dump -in on top of this. -.PP -A -.I dump -followed by a -.I mkfs -and a -.I restor -is used to -change the size of a file system. -.SH FILES -default tape unit varies with installation -.br -rst* -.SH "SEE ALSO" -dump(1), mkfs(1), dumpdir(1) -.SH DIAGNOSTICS -There are various diagnostics -involved with reading the tape and writing the disk. -There are also diagnostics if the i-list or the free list -of the file system is not large enough to hold the dump. -.PP -If the dump extends over more than one tape, -it may ask you to change tapes. -Reply with a new-line when the next tape has been mounted. -.SH BUGS -There is redundant information on the tape -that could be used in case of tape reading problems. -Unfortunately, -.I restor -doesn't use it. //GO.SYSIN DD restor.1m echo rev.1 sed 's/.//' >rev.1 <<'//GO.SYSIN DD rev.1' -.TH REV 1 -.SH NAME -rev \- reverse lines of a file -.SH SYNOPSIS -.B rev -[ file ] ... -.SH DESCRIPTION -.I Rev -copies the named files to the standard output, -reversing the order of characters in every line. -If no file is specified, the standard input is copied. //GO.SYSIN DD rev.1 echo rm.1 sed 's/.//' >rm.1 <<'//GO.SYSIN DD rm.1' -.TH RM 1 -.SH NAME -rm, rmdir \- remove (unlink) files -.SH SYNOPSIS -.B rm -[ -.B \-fri -] file ... -.PP -.B rmdir -dir ... -.PP -.SH DESCRIPTION -.I Rm -removes the entries for one or more -files -from a directory. -If an entry was the last link to the file, the file -is destroyed. -Removal of a file requires write permission in its directory, -but neither read nor write permission on the file itself. -.PP -If a file has no write permission -and the standard input is a terminal, -its permissions are printed and a line is read from -the standard input. -If that line begins with `y' the file is deleted, -otherwise the file remains. -No questions are asked -when the -.B \-f -(force) option is given. -.PP -If a designated file is a directory, -an error comment is printed unless the optional -argument -.B \-r -has been used. -In that case, -.I rm -recursively deletes the -entire contents of the specified directory, -and the directory itself. -.PP -If the -.B \-i -(interactive) option is in effect, -.I rm -asks whether to delete each file, -and, under -.BR \-r , -whether to examine each directory. -.PP -.I Rmdir -removes entries for the named directories, -which must be empty. -.SH "SEE ALSO" -unlink(2) -.SH DIAGNOSTICS -Generally self-explanatory. -It is forbidden to remove the file `..' merely to avoid the -antisocial consequences of inadvertently doing something like -`rm \-r .*'. //GO.SYSIN DD rm.1 echo roff.1 sed 's/.//' >roff.1 <<'//GO.SYSIN DD roff.1' -.TH ROFF 1 -.SH NAME -roff \- format text -.SH SYNOPSIS -.B roff -[ \fB+\fIn\fR ] [ \fB\-\fIn\fR ] [ -.B \-s -] [ -.B \-h -] file ... -.PP -.B nroff \-mr -[ option ] ... file ... -.br -.B troff \-mr -[ option ] ... file ... -.SH DESCRIPTION -.I Roff -formats text according to control lines embedded -in the text in the given files. -Encountering a nonexistent file terminates printing. -Incoming inter-terminal messages are turned off during printing. -The optional flag arguments mean: -.br -.ns -.TP 5 -.BI + n -Start printing at the first page with number -.IR n . -.br -.ns -.TP 5 -.BI \- n -Stop printing at the first page numbered higher -than -.IR n . -.br -.ns -.TP 5 -.B \-s -Stop before each page (including the first) -to allow paper manipulation; -resume on receipt of an interrupt signal. -.br -.ns -.TP 5 -.B \-h -Insert tabs in the output stream to replace -spaces whenever appropriate. -.PP -.DT -Input consists of intermixed -.I "text lines," -which contain information to be formatted, and -.I "request lines," -which contain instructions about how to format -it. -Request lines begin with a distinguished -.I "control character," -normally a period. -.PP -Output lines may be -.I filled -as nearly as possible with words without regard to -input lineation. -Line -.I breaks -may be caused at specified places by -certain commands, or by the appearance of an -empty input line or an input line beginning with a space. -.PP -The capabilities of -.I roff -are specified in the attached Request Summary. -Numerical values are denoted there by n or +n, -titles by t, and single characters by c. -Numbers denoted +n may be signed + or \-, -in which case they signify relative changes to -a quantity, otherwise they signify -an absolute resetting. -Missing n fields are ordinarily taken to be 1, -missing t fields to be empty, and c fields to shut off -the appropriate special interpretation. -.PP -Running titles usually appear at top and bottom of every -page. -They are set by requests like -.PP -.in +10 -.if t \&.he \(fmpart1\(fmpart2\(fmpart3\(fm -.if n \&.he 'part1'part2'part3' -.in -10 -.PP -Part1 is left justified, part2 is centered, -and part3 is right justified on the page. -Any % sign in a title is replaced by the current -page number. -Any nonblank may serve as a quote. -.PP -ASCII tab characters are replaced in the input by a -.I "replacement character," -normally a space, -according to the -column settings given by a .ta command. -(See .tr for how to convert this character on output.) -.PP -Automatic hyphenation of filled output is done -under control of .hy. -When a word contains a designated -.I "hyphenation character," -that character disappears from the output and -hyphens can be introduced into -the word at the marked places only. -.PP -The -.B \-mr -option of -.I nroff -or -.IR troff (1) -simulates -.I roff -to the greatest extent possible. -.SH FILES -/usr/lib/suftab suffix hyphenation tables -.br -/tmp/rtm? temporary -.br -.SH BUGS -.I Roff -is the simplest of the text formatting -programs, and is utterly frozen. -.bp -.tc | -.tr | -.in 0 -.ce -REQUEST SUMMARY -.PP -.ul -.ta \w'.tr cdef.. 'u +\w'Break 'u +\w'Initial 'u -.di x - \ka -.br -.di -.in \nau -.ti 0 -Request Break Initial Meaning -.na -.ti 0 -.li -.ad yes yes Begin adjusting right margins. -.ti 0 -.li -.ar no arabic Arabic page numbers. -.ti 0 -.li -.br yes \- Causes a line break \*- the filling of -the current line is stopped. -.ti 0 -.li -.bl|n yes \- Insert of n blank lines, on new page if necessary. -.ti 0 -.li -.bp|+n yes n=1 Begin new page and number it n; no n means `+1'. -.ti 0 -.li -.cc|c no c=. Control character becomes `c'. -.ti 0 -.li -.ce|n yes \- Center the next n input lines, -without filling. -.ti 0 -.li -.de|xx no \- Define parameterless macro -to be invoked by request `.xx' -(definition ends on line beginning `\fB..\fR'). -.ti 0 -.li -.ds yes no Double space; same as `.ls 2'. -.ti 0 -.li -.ef|t no t=\*a\*a\*a\*a Even foot title becomes t. -.ti 0 -.li -.eh|t no t=\*a\*a\*a\*a Even head title becomes t. -.ti 0 -.li -.fi yes yes Begin filling output lines. -.ti 0 -.li -.fo no t=\*a\*a\*a\*a All foot titles are t. -.ti 0 -.li -.hc|c no none Hyphenation character becomes `c'. -.ti 0 -.li -.he|t no t=\*a\*a\*a\*a All head titles are t. -.ti 0 -.li -.hx no \- Title lines are suppressed. -.ti 0 -.li -.hy|n no n=1 Hyphenation is done, if n=1; -and is not done, if n=0. -.ti 0 -.li -.ig no \- Ignore input lines through -a line beginning with `\fB..\fR'. -.ti 0 -.li -.in|+n yes \- Indent n spaces from left margin. -.ti 0 -.li -.ix +n no \- Same as `.in' but without break. -.ti 0 -.li -.li|n no \- Literal, treat next n lines as text. -.ti 0 -.li -.ll|+n no n=65 Line length including indent is n characters. -.ti 0 -.li -.ls|+n yes n=1 Line spacing set to n lines per output line. -.ti 0 -.li -.m1|n no n=2 Put n blank lines between the top -of page and head title. -.ti 0 -.li -.m2|n no n=2 n blank lines put between head title -and beginning of text on page. -.ti 0 -.li -.m3|n no n=1 n blank lines put between end of -text and foot title. -.ti 0 -.li -.m4|n no n=3 n blank lines put between the foot title -and the bottom of page. -.ti 0 -.li -.na yes no Stop adjusting the right margin. -.ti 0 -.li -.ne|n no \- Begin new page, if n output lines -cannot fit on present page. -.ti 0 -.li -.nn|+n no \- The next n output lines are not numbered. -.ti 0 -.li -.n1 no no Add 5 to page offset; -number lines in margin from 1 on each page. -.ti 0 -.li -.n2|n no no Add 5 to page offset; -number lines from n; -stop if n=0. -.ti 0 -.li -.ni|+n no n=0 Line numbers are indented n. -.ti 0 -.li -.nf yes no Stop filling output lines. -.ti 0 -.li -.nx|file \- Switch input to `file'. -.ti 0 -.li -.of|t no t=\*a\*a\*a\*a Odd foot title becomes t. -.ti 0 -.li -.oh|t no t=\*a\*a\*a\*a Odd head title becomes t. -.ti 0 -.li -.pa|+n yes n=1 Same as `.bp'. -.ti 0 -.li -.pl|+n no n=66 Total paper length taken to be n lines. -.ti 0 -.li -.po|+n no n=0 Page offset. -All lines are preceded by n spaces. -.ti 0 -.li -.ro no arabic Roman page numbers. -.ti 0 -.li -.sk|n no \- Produce n blank pages starting next page. -.ti 0 -.li -.sp|n yes \- Insert block of n blank lines, -except at top of page. -.ti 0 -.li -.ss yes yes Single space output lines, -equivalent to `.ls 1'. -.ti 0 -.li -.ta|n|n.. \- Pseudotab settings. -Initial tab settings are columns 9 17 25 ... -.ti 0 -.li -.tc|c no space Tab replacement character becomes `c'. -.ti 0 -.li -.ti|+n yes \- Temporarily indent next output -line n spaces. -.ti0 -.li -.tr|cdef.. no \- Translate c into d, e into f, etc. -.ti0 -.li -.ul|n no \- Underline the letters and numbers -in the next n input lines. -.br -.tr || //GO.SYSIN DD roff.1 echo sa.1m sed 's/.//' >sa.1m <<'//GO.SYSIN DD sa.1m' -.TH SA 1M -.SH NAME -sa, accton \- system accounting -.SH SYNOPSIS -.B sa -[ -.B \-abcjlnrstuv -] [ file ] -.PP -.B /etc/accton -[ file ] -.SH DESCRIPTION -With an argument naming an existing -.I file, -.I accton -causes system accounting information for -every process executed to be placed at the end of the file. -If no arguemnt is given, accounting is turned off. -.PP -.I Sa -reports on, cleans up, and generally maintains -accounting files. -.PP -.I Sa -is able to condense -the information in -.I /usr/adm/acct -into a summary file -.I /usr/adm/savacct -which contains a count of the -number of times each command was called and the time resources -consumed. -This condensation is desirable because on a large system -.I acct -can grow by 100 blocks per day. -The summary file is read before the accounting file, -so the reports include all available information. -.PP -If a file name is given as the last argument, -that file will be treated -as the accounting file; -.I sha -is the default. -There are zillions of options: -.PP -.TP -a -Place all command names containing unprintable characters -and those used only once under the name `***other.' -.TP -b -Sort output by sum of user and system time divided by number of -calls. -Default sort is by sum of user and system times. -.TP -c -Besides total user, system, and real time for each command print percentage -of total time over all commands. -.TP -j -Instead of total minutes time for each category, -give seconds per call. -.TP -l -Separate system and user time; normally they are combined. -.TP -m -Print number of processes and number of CPU minutes for each user. -.TP -n -Sort by number of calls. -.TP -r -Reverse order of sort. -.TP -s -Merge accounting file into summary file -.I /usr/adm/savacct -when done. -.TP -t -For each command report ratio of real time to the sum of user and -system times. -.TP -u -Superseding all other flags, -print for each command in the accounting file the -user ID and command name. -.TP -v -If the next character is a digit -.I n, -then type the name of -each command used -.I n -times or fewer. -Await a reply from the typewriter; -if it begins with `y', add the command to -the category `**junk**.' -This is used to strip out garbage. -.dt -.SH FILES -/usr/adm/acct raw accounting -.br -/usr/adm/savacct summary -.br -/usr/adm/usracct per-user summary -.SH "SEE ALSO" -ac(1), acct(2) //GO.SYSIN DD sa.1m echo sed.1 sed 's/.//' >sed.1 <<'//GO.SYSIN DD sed.1' -.TH SED 1 -.SH NAME -sed \- stream editor -.SH SYNOPSIS -.B sed -[ -.B \-n -] -[ -.B \-e -script ] [ -.B \-f -sfile ] [ file ] ... -.SH DESCRIPTION -.I Sed -copies the named -.I files -(standard input default) to the standard output, -edited according to a script of commands. -The -.B \-f -option causes the script to be taken from file -.IR sfile ; -these options accumulate. -If there is just one -.B \-e -option and no -.BR \-f 's, -the flag -.B \-e -may be omitted. -The -.B \-n -option suppresses the default output. -.PP -A script consists of editing commands, one per line, -of the following form: -.IP -[address [, address] ] function [arguments] -.PP -In normal operation -.I sed -cyclically copies a line of input into a -.I pattern space -(unless there is something left after -a `D' command), -applies in sequence -all commands whose -.I addresses -select that pattern space, -and at the end of the script copies the pattern space -to the standard output (except under -.BR \-n ) -and deletes the pattern space. -.PP -An -.I address -is either a decimal number that counts -input lines cumulatively across files, a `$' that -addresses the last line of input, or a context address, -`/regular expression/', in the style of -.IR ed (1) -modified thus: -.IP -The escape sequence `\en' matches a -newline embedded in the pattern space. -.PP -A command line with no addresses selects every pattern space. -.PP -A command line with -one address selects each pattern space that matches the address. -.PP -A command line with -two addresses selects the inclusive range from the first -pattern space that matches the first address through -the next pattern space that matches -the second. -(If the second address is a number less than or equal -to the line number first selected, only one -line is selected.) -Thereafter the process is repeated, looking again for the -first address. -.PP -Editing commands can be applied only to non-selected pattern -spaces by use of the negation function `!' (below). -.PP -In the following list of functions the -maximum number of permissible addresses -for each function is indicated in parentheses. -.PP -An argument denoted -.I text -consists of one or more lines, -all but the last of which end with `\e' to hide the -newline. -Backslashes in text are treated like backslashes -in the replacement string of an `s' command, -and may be used to protect initial blanks and tabs -against the stripping that is done on -every script line. -.PP -An argument denoted -.I rfile -or -.I wfile -must terminate the command -line and must be preceded by exactly one blank. -Each -.I wfile -is created before processing begins. -There can be at most 10 distinct -.I wfile -arguments. -.TP -(1)\|a\e -.br -.ns -.TP -.I text -.br -Append. -Place -.I text -on the output before -reading the next input line. -.TP -.RI (2)\|b " label" -Branch to the `:' command bearing the -.IR label . -If -.I label -is empty, branch to the end of the script. -.TP -(2)\|c\e -.br -.ns -.TP -.I text -.br -Change. -Delete the pattern space. -With 0 or 1 address or at the end of a 2-address range, place -.I text -on the output. -Start the next cycle. -.TP -(2)\|d -Delete the pattern space. -Start the next cycle. -.TP -(2)\|D -Delete the initial segment of the -pattern space through the first newline. -Start the next cycle. -.TP -(2)\|g -Replace the contents of the pattern space -by the contents of the hold space. -.TP -(2)\|G -Append the contents of the hold space to the pattern space. -.TP -(2)\|h -Replace the contents of the hold space by the contents of the pattern space. -.TP -(2)\|H -Append the contents of the pattern space to the hold space. -.TP -(1)\|i\e -.br -.ns -.TP -.I text -Insert. -Place -.I text -on the standard output. -.TP -(2)\|l -List the pattern space on the standard output in an -unambiguous form. -Non-printing characters are spelled in two digit ascii, -and long lines are folded. -.TP -(2)\|n -Copy the pattern space to the standard output. -Replace the pattern space with the next line of input. -.TP -(2)\|N -Append the next line of input to the pattern space -with an embedded newline. -(The current line number changes.) -.TP -(2)\|p -Print. -Copy the pattern space to the standard output. -.TP -(2)\|P -Copy the initial segment of the pattern space through -the first newline to the standard output. -.TP -(1)\|q -Quit. -Branch to the end of the script. -Do not start a new cycle. -.TP -.RI (2)\|r " rfile" -Read the contents of -.IR rfile . -Place them on the output before reading -the next input line. -.TP -.RI (2)\|s /regular\ expression/replacement/flags -Substitute the -.I replacement -string for instances of the -.I regular expression -in the pattern space. -Any character may be used instead of `/'. -For a fuller description see -.IR ed (1). -.I Flags -is zero or more of -.RS -.TP -g -Global. -Substitute for all nonoverlapping instances of the -.I regular expression -rather than just the -first one. -.TP -p -Print the pattern space if a replacement was made. -.TP -.RI w " wfile" -Write. -Append the pattern space to -.I wfile -if a replacement -was made. -.RE -.TP -.RI (2)\|t " label" -Test. -Branch to the `:' command bearing the -.I label -if any -substitutions have been made since the most recent -reading of an input line or execution of a `t'. -If -.I label -is empty, branch to the end of the script. -.TP -.RI (2)\|w " wfile" -Write. -Append the pattern space to -.IR wfile . -.TP -.RI (2)\|x -Exchange the contents of the pattern and hold spaces. -.TP -.RI (2)\|y /string1/string2/ -Transform. -Replace all occurrences of characters in -.I string1 -with the corresponding character in -.I string2. -The lengths of -.I -string1 -and -.I string2 -must be equal. -.TP -.RI (2)! " function" -Don't. -Apply the -.I function -(or group, if -.I function -is `{') only to lines -.I not -selected by the address(es). -.TP -.RI (0)\|: " label" -This command does nothing; it bears a -.I label -for `b' and `t' commands to branch to. -.TP -(1)\|= -Place the current line number on the standard output as a line. -.TP -(2)\|{ -Execute the following commands through a matching `}' -only when the pattern space is selected. -.TP -(0)\| -An empty command is ignored. -.SH SEE ALSO -ed(1), grep(1), awk(1) //GO.SYSIN DD sed.1 echo sh.1 sed 's/.//' >sh.1 <<'//GO.SYSIN DD sh.1' -.ds OK [\| -.ds CK \|] -.ds LT \s-2<\s0 -.ds GT \s-2>\s0 -.ds LE \s-2<\s0 -.ds ST * -.TH SH 1 -.SH NAME -sh, -for, -case, -if, -while, -.BR : , -.BR . , -break, -continue, -cd, -eval, -exec, -exit, -export, -login, -newgrp, -read, -readonly, -set, -shift, -times, -trap, -umask, -wait -\- command language -.SH SYNOPSIS -.B sh -[ -.B \-ceiknrstuvx -] [ arg ] ... -.SH DESCRIPTION -.I Sh -is a command programming language -that executes commands read from a terminal -or a file. -See -.B invocation -for the meaning of arguments to the shell. -.PP -.B Commands. -.br -A -.I simple-command -is a sequence of non blank -.I words -separated by blanks (a blank is a -.B tab -or a -.BR space ). -The first word specifies the name of the command to -be executed. -Except as specified below -the remaining words are passed as arguments -to the invoked command. -The command name is passed as argument 0 -(see -.IR exec (2)). -The -.I value -of a simple-command is its exit status -if it terminates normally or 200+\fIstatus\fP if -it terminates abnormally (see -.IR signal (2) -for a list of -status values). -.LP -A -.I pipeline -is a sequence of one or more -.I commands -separated by -.B \(or. -The standard output of each command but the last -is connected by a -.IR pipe (2) -to the standard input of the next command. -Each command is run as a separate process; -the shell waits for the last command to terminate. -.LP -A -.I list -is a sequence of one or more -.I pipelines -separated by -.BR ; , -.BR & , -.B && -or -.B \(or\|\(or -and optionally terminated by -.B ; -or -.BR & . -.B ; -and -.B & -have equal precedence -which is lower than that of -.B && -and -.BR \(or\|\(or , -.B && -and -.B \(or\|\(or -also have equal precedence. -A semicolon causes sequential execution; an ampersand causes -the preceding -.I pipeline -to be executed without waiting for it to finish. -The symbol -.B && -.RB ( \(or\|\(or ) -causes the -.I list -following to be executed only if the preceding -.I pipeline -returns a zero (non zero) value. -Newlines may appear in a -.I list, -instead of semicolons, -to delimit commands. -.LP -A -.I command -is either a simple-command -or one of the following. -The value returned by a command is that of the -last simple-command executed in the command. -.TP -\fBfor \fIname\fR \*(OK\fBin \fIword\fR ...\*(CK \fBdo \fIlist \fBdone\fR -Each time a -.B for -command is executed -.I name -is set to the next word in the -.B for -word list -If -.BI in \ word -\&... -is omitted then -.B -in "$@" -is assumed. -Execution ends when there are no more words in the list. -.TP -\fBcase \fIword \fBin\fR \*(OK\fIpattern \fR\*(OK \fB\(or \fIpattern \fR\*(CK ... \fB) \fIlist \fB;;\fR\*(CK ... \fBesac\fR -A -.B case -command executes the -.I list -associated with the first -pattern that matches -.I word. -The form of the patterns is -the same as that used for -file name generation. -.TP -\fBif \fIlist \fBthen \fIlist\fR \*(OK\fBelif \fIlist \fBthen \fIlist\fR\*(CK ... \*(OK\fBelse \fIlist\fR\*(CK \fBfi\fR -The -.I list -following -.B if -is executed and if it returns zero the -.I list -following -.B then -is executed. -Otherwise, the -.I list -following -.B elif -is executed and if its value is zero -the -.I list -following -.B then -is executed. -Failing that the -.B else -.I list -is executed. -.TP -\fBwhile \fIlist\fR \*(OK\fBdo \fIlist\fR\*(CK \fBdone\fR -A -.B while -command repeatedly executes the -.B while -.I list -and if its value is zero executes the -.B do -.I list; -otherwise the loop terminates. -The value returned by a -.B while -command is that -of the last executed command in the -.B do -.I list. -.B until -may be used in place of -.B while -to negate -the loop termination test. -.TP -.BI ( " list " ) -Execute -.I list -in a subshell. -.TP -.BI { " list " } -.I list -is simply executed. -.LP -The following words -are only recognized as the first word of a command -and when not quoted. -.IP -.B -if then else elif fi case in esac for while until do done { } -.PP -.B Command substitution. -.br -The standard output from a command enclosed in -a pair of grave accents -.RB ( \`\|\` ) -may be used as part or all -of a word; -trailing newlines are removed. -.PP -.B Parameter substitution. -.br -The character -.B $ -is used to introduce substitutable -parameters. -Positional parameters may be assigned values by -.BR set . -Variables may be set by writing -.IP -.IB name = value -[ -.IB name = value -] ... -.TP -$\fB\|{\fIparameter\fB\|}\fR -A -.I parameter -is a sequence of letters, digits or underscores (a -.IR name ), -a digit, -or any of the characters -.B -* @ # ? \- $ !\|. -The value, if any, of the parameter is substituted. -The braces are required only when -.I parameter -is followed by a letter, digit, or underscore -that is not to be interpreted as part of its name. -If -.I parameter -is a digit then it is a positional parameter. -If -.I parameter -is -.BR * " or" " @" -then all the positional -parameters, starting with -.SM -.BR $1 , -are substituted -separated by spaces. -.SM -.B $0 -is set from argument zero when the shell -is invoked. -.TP -$\fB\|{\fIparameter\|\-word\|\fB}\fR -If -.I parameter -is set then substitute its value; -otherwise substitute -.I word. -.TP -$\fB\|{\fIparameter\|\(eq\|word\|\fB}\fR -If -.I parameter -is not set then set it to -.I word; -the value of the parameter is then substituted. -Positional parameters may not be assigned to -in this way. -.TP -$\fB\|{\fIparameter\|?\|word\|\fB}\fR -If -.I parameter -is set then substitute its value; -otherwise, print -.I word -and exit from the shell. -If -.I word -is omitted then a standard message is printed. -.TP -$\fB\|{\fIparameter\|\(plword\|\fB}\fR -If -.I parameter -is set then substitute -.I word; -otherwise substitute nothing. -.LP -In the above -.I word -is not evaluated unless it is -to be used as the substituted string. -(So that, for example, -echo ${d\-\`pwd\`} -will only execute -.I pwd -if -.I d -is unset.) -.LP -The following -.I parameters -are automatically set by the shell. -.RS -.TP -.B # -The number of positional parameters in decimal. -.PD 0 -.TP -.B \- -Options supplied to the shell on invocation or by -.BR set . -.TP -.B ? -The value returned by the last executed command -in decimal. -.TP -.B $ -The process number of this shell. -.TP -.B ! -The process number of the last background command invoked. -.PD -.RE -.LP -The following -.I parameters -are used but not set by the shell. -.RS -.TP -.B -.SM HOME -The default argument (home directory) for the -.B cd -command. -.PD 0 -.TP -.B -.SM PATH -The search path for commands (see -.BR execution ). -.TP -.B -.SM MAIL -If this variable is set to the name of -a mail file then the shell informs the user of -the arrival of mail in the specified file. -.SM -.TP -.B PS1 -Primary prompt string, by default `$ '. -.TP -.SM -.B PS2 -Secondary prompt string, by default `> '. -.TP -.SM -.B IFS -Internal field separators, -normally -.BR space , -.BR tab , -and -.BR newline . -.PD -.RE -.PP -.B Blank interpretation. -.br -After parameter and command substitution, -any results of substitution are scanned for internal field separator -characters (those found in -.SM -.BR $IFS \*S) -and split into distinct arguments where such characters are found. -Explicit null arguments ("" or \'\') are retained. -Implicit null arguments -(those resulting from -.I parameters -that have no values) are removed. -.PP -.B File name generation. -.br -Following substitution, each command word is scanned for -the characters -.BR * , -.B ? -and -.B \*(OK. -If one of these characters appears -then the word is regarded as a pattern. -The word is replaced with alphabetically sorted file names that match the pattern. -If no file name is found that matches the pattern then -the word is left unchanged. -The character -.B . -at the start of a file name -or immediately following a -.BR / , -and the character -.BR / , -must be matched explicitly. -.TP -.B \*(ST -Matches any string, including the null string. -.PD 0 -.TP -.B ? -Matches any single character. -.TP -.B \*(OK...\*(CK -Matches any one of the characters -enclosed. -A pair of characters separated by -.B \- -matches any -character lexically between the pair. -.PD -.PP -.B Quoting. -.br -The following characters have a special meaning to the shell -and cause termination of a word unless quoted. -.LP - \fB; & ( ) \(or \*(LT \*(GT newline space tab\fP -.LP -A character may be -.I quoted -by preceding -it with a -.B -\\\|. -.B \\\\newline -is ignored. -All characters enclosed between a pair of quote marks (\fB\'\|\'\fP), -except a single quote, -are quoted. -Inside double quotes -(\fB"\|"\fP) -parameter and command substitution occurs and -.B -\\ -quotes the characters -.B -\\ \` " -and -.BR $ \|. -.LP -.B -"$*" -is equivalent to -.SM -.B -"$1 $2 ..." -whereas -.br -.B -"$@" -is equivalent to -.SM -.B -"$1" "$2" ... . -.PP -.B Prompting. -.br -When used interactively, -the shell prompts with the value of -.SM -PS1 -before reading a command. -If at any time a newline is typed and further input is needed -to complete a command then the secondary prompt -.RB ( \s-2$PS2\s0 ) -is issued. -.PP -.B Input output. -.br -Before a command is executed its input and output -may be redirected using a special notation interpreted by the shell. -The following may appear anywhere in a simple-command -or may precede or follow a -.I command -and are not passed on to the invoked command. -Substitution occurs before -.I word -or -.I digit -is used. -.TP -\*(LT\fI\|word\fP -Use file -.I word -as standard input (file descriptor 0). -.PD -.TP -\*(GT\fI\|word\fP -Use file -.I word -as standard output (file descriptor 1). -If the file does not exist then it is created; -otherwise it is truncated to zero length. -.TP -\*(GT\*(GT\fI\|word\fP -Use file -.I word -as standard output. -If the file exists then output is appended (by seeking to the end); -otherwise the file is created. -.TP -\*(LT\*(LT\fI\|word\fP -The shell input is read up to a line the same as -.IR word , -or end of file. -The resulting document becomes -the standard input. -If any character of -.I word -is quoted then no interpretation -is placed upon the characters of the document; -otherwise, parameter and command substitution occurs, -.B -\\newline -is ignored, -and -.B -\\ -is used to quote the characters -.B -\\ $ \` -and the first character of -.I word. -.TP -\*(LT\|&\|\fIdigit\fP -The standard input is duplicated from file descriptor -.I digit; -see -.IR dup (2). -Similarly for the standard output using \*(GT\|. -.TP -\*(LT\|&\|\- -The standard input is closed. -Similarly for the standard output using \*(GT\|. -.PD -.LP -If one of the above is preceded by a digit -then the -file descriptor created is that specified -by the digit -(instead of the default 0 or 1). -For example, -.LP - \&... 2\*(GT&1 -.LP -creates file descriptor 2 to be a duplicate -of file descriptor 1. -.LP -If a command is followed by -.B & -then the default standard input -for the command -is the empty file -(/dev/null). -Otherwise, the environment for the execution of a command contains the -file descriptors of the invoking shell as modified by input -output specifications. -.PP -.B Environment. -.br -The environment -is a list of name-value pairs that is passed to -an executed program in the same way as a normal argument list; -see -.IR exec (2) -and -.IR environ (5). -The shell interacts with the environment in several ways. -On invocation, the shell scans the environment -and creates a -.I parameter -for each name found, -giving it the corresponding value. -Executed commands inherit the same environment. -If the user modifies the values of these -.I parameters -or creates new ones, -none of these affects the environment -unless the -.B export -command is used to bind the shell's -.I parameter -to the environment. -The environment seen by any executed command is thus composed -of any unmodified name-value pairs originally inherited by the shell, -plus any modifications or additions, -all of which must be noted in -.B export -commands. -.LP -The environment for any -.I simple-command -may be augmented by prefixing it with one or more assignments to -.I parameters. -Thus these two lines are equivalent -.IP -TERM=450 cmd args -.br -(export TERM; TERM=450; cmd args) -.LP -If the -.B \-k -flag is set, -.I all -keyword arguments are placed in the environment, -even if the occur after the command name. -The following prints `a=b c' and `c': -.nf -echo a=b c -set \-k -echo a=b c -.fi -.PP -.B Signals. -.br -The INTERRUPT and QUIT signals for an invoked -command are ignored if the command is followed by -.BR & ; -otherwise signals have the values -inherited by the shell from its parent. -(But see also -.BR trap. ) -.PP -.B Execution. -.br -Each time a command is executed the above substitutions -are carried out. -Except for the `special commands' listed below a new -process is created and -an attempt is made to execute the command via an -.IR exec (2). -.LP -The shell parameter -.B -.SM $PATH -defines the search path for -the directory containing the command. -Each alternative directory name is separated by -a colon -.RB ( : ). -The default path is -.BR :/bin:/usr/bin . -If the command name contains a / then the search path -is not used. -Otherwise, each directory in the path is -searched for an executable file. -If the file has execute permission but is not an -.I a.out -file, -it is assumed to be a file containing shell commands. -A subshell (i.e., a separate process) is spawned to read it. -A parenthesized command is also executed in -a subshell. -.PP -.B Special commands. -.br -The following commands are executed in the shell process -and except where specified -no input output redirection is permitted for such commands. -.TP -.B : -No effect; the command does nothing. -.PD 0 -.TP -.BI . \ file -Read and execute commands from -.I file -and return. -The search path -.B -.SM $PATH -is used to find the directory containing -.IR file . -.TP -\fBbreak\fR \*(OK\fIn\fR\*(CK -Exit from the enclosing -.B for -or -.B while -loop, if any. -If -.I n -is specified then break -.I n -levels. -.TP -\fBcontinue\fR \*(OK\fIn\fR\*(CK -Resume the next iteration of the enclosing -.B for -or -.B while -loop. -If -.I n -is specified then resume at the -.IR n -th -enclosing loop. -.TP -\fBcd\fR \*(OK\fIarg\fR\*(CK -Change the current directory to -.I arg. -The shell -parameter -.B -.SM $HOME -is the default -.IR arg . -.TP -\fBeval\fR \*(OK\fIarg \fR...\*(CK -The arguments are read as input -to the shell -and the resulting command(s) executed. -.TP -\fBexec\fR \*(OK\fIarg \fR...\*(CK -The command specified by -the arguments is executed in place of this shell -without creating a new process. -Input output arguments may appear and if no other -arguments are given cause the shell input -output to be modified. -.TP -\fBexit\fR \*(OK\fIn\fR\*(CK -Causes a non interactive shell to exit -with the exit status specified by -.I n. -If -.I n -is omitted then the exit status is that of the last command executed. -(An end of file will also exit from the shell.) -.TP -\fBexport\fR \*(OK\fIname\fR ...\*(CK -The given names are marked -for automatic export to the -.I environment -of subsequently-executed commands. -If no arguments are given then a list of -exportable names is printed. -.TP -\fBlogin\fR \*(OK\fIarg\fR ...\*(CK -Equivalent to `exec login arg ...'. -.TP -\fBnewgrp\fR \*(OK\fIarg \fR...\*(CK -Equivalent to `exec newgrp arg ...'. -.TP -.BI read \ name\ ... -One line is read from the standard input; -successive words of the input are assigned to the -variables -.I name -in order, -with leftover words to the last variable. -The return code is 0 unless the end-of-file is encountered. -.TP -\fBreadonly\fR \*(OK\fIname \fR...\*(CK -The given names are marked readonly and -the values of the these names may not be changed -by subsequent assignment. -If no arguments are given then a list -of all readonly names is printed. -.TP -\fBset\fR \*(OK\fB\-eknptuvx\fR \*(OK\fIarg \fR...\*(CK\*(CK -.RS -.PD 0 -.TP 3m -.B \-e -If non interactive then exit immediately if a command fails. -.TP -.B \-k -All keyword arguments are placed in the environment for a command, -not just those that precede the command name. -.TP -.B \-n -Read commands but do not execute them. -.TP -.B \-t -Exit after reading and executing one command. -.TP -.B \-u -Treat unset variables as an error when substituting. -.TP -.B \-v -Print shell input lines as they are read. -.TP -.B \-x -Print commands and their arguments as they are executed. -.TP -.B \- -Turn off the -.B \-x -and -.B \-v -options. -.PD -.LP -These flags can also be used upon invocation of the shell. -The current set of flags may be found in -.BR $\- . -.LP -Remaining arguments are positional -parameters and are assigned, in order, to -.SM -.BR $1 , -.SM -.BR $2 , -etc. -If no arguments are given then the values -of all names are printed. -.RE -.TP -.B shift -The positional parameters from -.SM -.BR $2 ... -are renamed -.SM -.BR $1 ... -.TP -.B times -Print the accumulated user and system times for -processes run from the shell. -.TP -\fBtrap\fR \*(OK\fIarg\fR\*(CK \*(OK\fIn\fR\*(CK ... -.I Arg -is a command to be read and executed when the shell -receives signal(s) -.I n. -(Note that -.I arg -is scanned once when -the trap is set and once when the trap -is taken.) -Trap commands are executed in order of signal number. -If -.I arg -is absent then all trap(s) -.I n -are reset -to their original values. -If -.I arg -is the null -string then this signal is ignored by the shell and by invoked commands. -If -.I n -is 0 then the command -.I arg -is executed -on exit from the shell, -otherwise upon receipt of signal -.I n -as numbered in -.IR signal (2). -.I Trap -with no arguments prints a list -of commands associated with each signal number. -.TP -\fBumask \fR[ \fInnn\fR ] -The user file creation mask is set to -the octal value -.I nnn -(see -.IR umask (2)). -If -.I nnn -is omitted, the current value of the mask is printed. -.TP -\fBwait\fP \*(OK\fIn\fP\*(CK -Wait for the specified process and -report its termination status. -If -.I n -is not given then all currently active child processes are waited for. -The return code from this command is that of -the process waited for. -.PD -.LP -.PP -.B Invocation. -.br -If the first character of argument zero is -.BR \- , -commands are read from -.BR \s-2$HOME\s0/.\|profile , -if such a file exists. -Commands are then read as described below. -The following flags are interpreted by the shell -when it is invoked. -.PD 0 -.TP 11n -.BI \-c \ string -If the -.B \-c -flag is present then -commands are read from -.I string\|. -.TP 11n -.B \-s -If the -.B \-s -flag is present or if no -arguments remain -then commands are read from the standard input. -Shell output is written to -file descriptor 2. -.TP 11n -.B \-i -If the -.B \-i -flag is present or -if the shell input and output are attached to a terminal (as told by -.IR gtty ) -then this shell is -.I interactive. -In this case the terminate signal -SIGTERM (see -.IR signal (2)) -is ignored (so that `kill 0' -does not kill an interactive shell) and the interrupt signal -SIGINT is caught and ignored -(so that -.B wait -is interruptable). -In all cases SIGQUIT is ignored by the shell. -.PD -.LP -The remaining flags and arguments are described under the -.B set -command. -.SH FILES -.RB $HOME/ . \^profile -.br -/tmp/sh* -.br -/dev/null -.SH SEE ALSO -test(1), -exec(2), -.SH DIAGNOSTICS -Errors detected by the shell, such as syntax errors -cause the shell -to return a non zero exit status. -If the shell is being used non interactively -then execution of the shell file is abandoned. -Otherwise, the shell returns the exit status of -the last command executed (see also -.BR exit ). -.SH BUGS -If \*(LT\*(LT is used to provide standard input to an asynchronous -process invoked by &, -the shell gets mixed up about naming the input document. -A garbage file /tmp/sh* is created, and the shell complains about -not being able to find the file by another name. //GO.SYSIN DD sh.1 echo size.1 sed 's/.//' >size.1 <<'//GO.SYSIN DD size.1' -.TH SIZE 1 -.SH NAME -size \- size of an object file -.SH SYNOPSIS -.B size -[ object ... ] -.SH DESCRIPTION -.I Size -prints the (decimal) number of bytes -required by the -text, data, and bss -portions, and their sum in octal and decimal, -of each object-file argument. -If no file is specified, -.B a.out -is used. -.SH "SEE ALSO" -a.out(5) //GO.SYSIN DD size.1 echo sleep.1 sed 's/.//' >sleep.1 <<'//GO.SYSIN DD sleep.1' -.TH SLEEP 1 -.SH NAME -sleep \- suspend execution for an interval -.SH SYNOPSIS -.B sleep -time -.SH DESCRIPTION -.I Sleep -suspends execution for -.I time -seconds. -It is used to execute a command -after a certain amount of time as in: -.PP - (sleep 105; command)& -.PP -or to execute a command every so often, as in: -.PP - while true -.br - do -.br - command -.br - sleep 37 -.br - done -.SH "SEE ALSO" -alarm(2), sleep(3) -.SH BUGS -.I Time -must be less than 65536 seconds. //GO.SYSIN DD sleep.1 echo sort.1 sed 's/.//' >sort.1 <<'//GO.SYSIN DD sort.1' -.TH SORT 1 -.SH NAME -sort \- sort or merge files -.SH SYNOPSIS -.B sort -[ -.if t \fB\-mubdf\&inrt\fIx\fR -.if n -mubdfinrt_________x -] -[ \fB+\fIpos1 \fR [ \fB\-\fIpos2 \fR] -] ... -[ -.B \-o -name ] [ -.B \-T -directory ] [ name ] ... -.SH DESCRIPTION -.I Sort -sorts -lines of all the named files together -and writes the result on -the standard output. -The name `\-' means -the standard input. -If no input files are named, the standard input is sorted. -.PP -The default sort key is an entire line. -Default ordering is -lexicographic by bytes in machine -collating sequence. -The ordering is affected globally by the following options, -one or more of which may appear. -.TP 5 -.B b -Ignore leading blanks (spaces and tabs) in field comparisons. -.TP 5 -.B d -`Dictionary' order: only letters, digits and blanks -are significant in comparisons. -.TP 5 -.B f -Fold upper case -letters onto lower case. -.TP 5 -.B i -Ignore characters outside the ASCII range 040-0176 -in nonnumeric comparisons. -.TP 5 -.B n -An initial numeric string, -consisting of optional blanks, optional minus sign, -and zero or more digits with optional decimal point, -is sorted by arithmetic value. -Option -.B n -implies option -.B b. -.TP 5 -.B r -Reverse the sense of comparisons. -.TP 5 -.BI t x -`Tab character' separating fields is -.IR x . -.PP -The notation -.BI + "pos1 " "\-\fIpos2" -restricts a sort key to a field beginning at -.I pos1 -and ending just before -.IR pos2 . -.I Pos1 -and -.I pos2 -each have the form -.IB m . n\fR, -optionally followed by one or more of the flags -.B bdf\&inr, -where -.I m -tells a number of fields to skip from the beginning of the line and -.I n -tells a number of characters to skip further. -If any flags are present they override all the global -ordering options for this key. -If the -.B b -option is in effect -.I n -is counted from the first nonblank in the field; -.B b -is attached independently to -.IR pos2 . -A missing -\&\fB.\fIn\fR -means .0; -a missing -.BI \- pos2 -means the end of the line. -Under the -.BI \-t x -option, fields are strings separated by -.IR x ; -otherwise fields are -nonempty nonblank strings separated by blanks. -.PP -When there are multiple sort keys, later keys -are compared only after all earlier keys -compare equal. -Lines that otherwise compare equal are ordered -with all bytes significant. -.PP -These option arguments are also understood: -.TP 5 -.B c -Check that the input file is sorted according to the ordering rules; -give no output unless the file is out of sort. -.TP 5 -.B m -Merge only, the input files are already sorted. -.TP 5 -.B o -The next argument is the name of an output file -to use instead of the standard output. -This file may be the same as one of the inputs. -.TP 5 -.B T -The next argument is the name of a directory in which temporary files -should be made. -.TP 5 -.B u -Suppress all but one in each -set of equal lines. -Ignored bytes -and bytes outside keys -do not participate in -this comparison. -.PP -.B Examples. -Print in alphabetical order all the unique spellings -in a list of words. -Capitalized words differ from uncapitalized. -.PP -.ti +8 -sort \-u +0f +0 list -.PP -Print the password file -.RI ( passwd (5)) -sorted by user id number (the 3rd colon-separated field). -.PP -.ti +8 -sort \-t: +2n /etc/passwd -.PP -Print the first instance of each month in an already sorted file -of (month day) entries. -The options -.B \-um -with just one input file make the choice of a -unique representative from a set of equal lines predictable. -.PP -.ti +8 -sort \-um +0 \-1 dates -.SH FILES -/usr/tmp/stm*, /tmp/*: first and second tries for -temporary files -.SH "SEE ALSO" -uniq(1), -comm(1), -rev(1), -join(1) -.SH DIAGNOSTICS -Comments and exits with nonzero status for various trouble -conditions and for disorder discovered under option -.BR \-c . -.SH BUGS -Very long lines are silently truncated. //GO.SYSIN DD sort.1 echo spell.1 sed 's/.//' >spell.1 <<'//GO.SYSIN DD spell.1' -.TH SPELL 1 -.SH NAME -spell, spellin, spellout \- find spelling errors -.SH SYNOPSIS -.B spell -[ option ] ... -[ file ] ... -.PP -.B /usr/src/cmd/spell/spellin -[ list ] -.PP -.B /usr/src/cmd/spell/spellout -[ -.B \-d -] list -.SH DESCRIPTION -.I Spell -collects words from the named documents, -and looks them up in a spelling list. -Words that neither occur among nor are derivable -(by applying certain inflections, -prefixes or suffixes) from words in the spelling list -are printed on the standard output. -If no files are named, -words are collected from the standard input. -.PP -.I Spell -ignores most -.I troff, -.I tbl -and -.IR eqn (1) -constructions. -.PP -Under the -.B \-v -option, all words not literally in the spelling list are printed, -and plausible derivations from spelling list words are indicated. -.PP -Under the -.B \-b -option, British spelling is checked. -Besides preferring -.ft I -centre, colour, speciality, travelled, -.ft R -etc., -this option insists upon -.I -ise -in words like -.I standardise, -Fowler and the OED to the contrary -notwithstanding. -.PP -Under the -.B \-x -option, every plausible stem is printed with `=' for each word. -.PP -The spelling list is based on many sources, -and while more haphazard than an ordinary -dictionary, is also more effective in respect to -proper names and popular technical words. -Coverage of -the specialized vocabularies of biology, -medicine and chemistry is light. -.PP -Pertinent auxiliary files may be specified by -name arguments, indicated below with their -default settings. -Copies of all output -are accumulated in the history file. -The stop list filters out misspellings (e.g. thier=thy\-y+ier) -that would otherwise pass. -.PP -Two routines help maintain the hash lists used by -.I spell. -Both expect a list of words, one per line, -from the standard input. -.I Spellin -adds the words on the standard input to the -preexisting -.I list -and places a new list on the standard output. -If no -.I list -is specified, the new list is created from scratch. -.I Spellout -looks up each word in the standard input and prints -on the standard output -those that are missing from (or present on, with -option -.BR \-d ) -the hash list. -.SH FILES -D=/usr/dict/hlist[ab]: hashed spelling lists, American & British -.br -S=/usr/dict/hstop: hashed stop list -.br -H=/usr/dict/spellhist: history file -.br -/usr/lib/spell -.br -deroff(1), sort(1), tee(1), sed(1) -.SH BUGS -The spelling list's coverage is uneven; -new installations will probably wish to -monitor the output for several months to gather -local additions. -.br -British spelling was done by an American. //GO.SYSIN DD spell.1 echo spline.1g sed 's/.//' >spline.1g <<'//GO.SYSIN DD spline.1g' -.TH SPLINE 1G -.SH NAME -spline \- interpolate smooth curve -.SH SYNOPSIS -.B spline -[ option ] ... -.SH DESCRIPTION -.I Spline -takes pairs of numbers from the standard input as abcissas and ordinates -of a function. -It produces a similar set, which -is approximately equally spaced and -includes the input set, on the standard output. -The cubic spline output -(R. W. Hamming, -.ft I -Numerical Methods for Scientists and Engineers, -.ft R -2nd ed., 349ff) -has two continuous derivatives, -and sufficiently many points to look smooth when plotted, for -example by -.IR graph (1). -.PP -The following options are recognized, -each as a separate argument. -.TP 5 -.B \-a -Supply abscissas automatically (they are missing from -the input); spacing is given by the next -argument, or is assumed to be 1 if next argument is not a number. -.TP 5 -.B \-k -The constant -.IR k "" -used in the boundary value computation -.IP -.if n .ig -.ti +1.5i -.ds ' \h'-\w'\(fm\(fm'u' -.EQ -.nr 99 \n(.s -.nr 98 \n(.f -'ps 10 -.ft I -.ds 11 "y\(fm\(fm -.nr 11 \w'\*(11' -.ds 12 "\*' -.nr 12 \w'\*(12' -'ps 8 -.ds 13 "\fR0\fP -.nr 13 \w'\*(13' -.as 12 \v'18u'\s8\*(13\|\s10\v'-18u' -'ps 10 -.nr 12 \n(12+\n(13+\w'\s8\|' -.as 11 "\*(12 -.nr 11 \w'\*(11' -.ds 12 "\|\| -.nr 12 \w'\*(12' -.as 11 "\*(12 -.nr 11 \w'\*(11' -.ds 12 "\|=\| -.nr 12 \w'\*(12' -.as 11 "\*(12 -.nr 11 \w'\*(11' -.ds 12 "\|\| -.nr 12 \w'\*(12' -.as 11 "\*(12 -.nr 11 \w'\*(11' -.ds 12 "ky\(fm\(fm -.nr 12 \w'\*(12' -.as 11 "\*(12 -.nr 11 \w'\*(11' -.ds 12 "\*' -.nr 12 \w'\*(12' -'ps 8 -.ds 13 "\fR1\fP -.nr 13 \w'\*(13' -.as 12 \v'18u'\s8\*(13\|\s10\v'-18u' -'ps 10 -.nr 12 \n(12+\n(13+\w'\s8\|' -.as 11 "\*(12 -.nr 11 \w'\*(11' -.ds 12 ", -.nr 12 \w'\*(12' -.as 11 "\*(12 -.nr 11 \w'\*(11' -.ds 12 "\|\| -.nr 12 \w'\*(12' -.as 11 "\*(12 -.nr 11 \w'\*(11' -.ds 12 "\|\| -.nr 12 \w'\*(12' -.as 11 "\*(12 -.nr 11 \w'\*(11' -.ds 12 "\|\| -.nr 12 \w'\*(12' -.as 11 "\*(12 -.nr 11 \w'\*(11' -.ds 12 "y\(fm\(fm -.nr 12 \w'\*(12' -.as 11 "\*(12 -.nr 11 \w'\*(11' -.ds 12 "\*' -.nr 12 \w'\*(12' -'ps 8 -.ds 13 "n -.nr 13 \w'\*(13' -.as 12 \v'18u'\s8\*(13\|\s10\v'-18u' -'ps 10 -.nr 12 \n(12+\n(13+\w'\s8\|' -.as 11 "\*(12 -.nr 11 \w'\*(11' -.ds 12 "\|\| -.nr 12 \w'\*(12' -.as 11 "\*(12 -.nr 11 \w'\*(11' -.ds 12 "\|=\| -.nr 12 \w'\*(12' -.as 11 "\*(12 -.nr 11 \w'\*(11' -.ds 12 "\|\| -.nr 12 \w'\*(12' -.as 11 "\*(12 -.nr 11 \w'\*(11' -.ds 12 "ky\(fm\(fm -.nr 12 \w'\*(12' -.as 11 "\*(12 -.nr 11 \w'\*(11' -.ds 12 "\*' -.nr 12 \w'\*(12' -'ps 8 -.ds 13 "n\|\(mi\|\fR1\fP -.nr 13 \w'\*(13' -.as 12 \v'18u'\s8\*(13\|\s10\v'-18u' -'ps 10 -.nr 12 \n(12+\n(13+\w'\s8\|' -.as 11 "\*(12 -.nr 11 \w'\*(11' -.ds 11 \x'0'\fI\*(11\s\n(99\f\n(98 -.ne 78u -\*(11 -'ps \n(99 -.ft \n(98 -.EN -.. -.if t .ig -.ce -(2nd deriv. at end) = k*(2nd deriv. next to end) -.. -.IP -.br -is set by the next argument. -By default -.IR k "" -= 0. -.TP 5 -.B \-n -Space output points -so that approximately -.I n -intervals occur between the lower and upper -.I x -limits. -(Default -.I n -= 100.) -.TP 5 -.B \-p -Make output periodic, i.e. match -derivatives at ends. -First and last input values should normally agree. -.TP 5 -.B \-x -Next -1 (or 2) arguments are lower (and upper) -.I x -limits. -Normally these limits are calculated from the data. -Automatic abcissas start at lower limit -(default 0). -.SH "SEE ALSO" -graph(1) -.SH DIAGNOSTICS -When data is not strictly monotone in -.I x, -.I spline -reproduces the input without interpolating extra points. -.SH BUGS -A limit of 1000 input points is enforced silently. //GO.SYSIN DD spline.1g echo split.1 sed 's/.//' >split.1 <<'//GO.SYSIN DD split.1' -.TH SPLIT 1 -.SH NAME -split \- split a file into pieces -.SH SYNOPSIS -.B split -[ -.B \-\fIn -] -[ file [ name ] ] -.SH DESCRIPTION -.I Split -reads -.I file -and writes -it in -.IR n -line -pieces -(default 1000), as many as necessary, -onto -a set of output files. The name of the first output -file is -.I name -with -.B aa -appended, and so on -lexicographically. -If no output name is given, -.B x -is default. -.PP -If no input file is given, or -if -.B \- -is given in its stead, -then the standard input file is used. //GO.SYSIN DD split.1 echo strip.1 sed 's/.//' >strip.1 <<'//GO.SYSIN DD strip.1' -.TH STRIP 1 -.SH NAME -strip \- remove symbols and relocation bits -.SH SYNOPSIS -.B strip -name ... -.SH DESCRIPTION -.I Strip -removes the symbol -table and relocation bits ordinarily attached to the output -of the assembler and loader. -This is useful to save space after a program has been -debugged. -.PP -The effect of -.I strip -is the same as use of the -.B \-s -option -of -.IR ld . -.SH FILES -/tmp/stm? temporary file -.SH "SEE ALSO" -ld(1) //GO.SYSIN DD strip.1 echo struct.1 sed 's/.//' >struct.1 <<'//GO.SYSIN DD struct.1' -.TH STRUCT 1 -.SH NAME -struct \- structure Fortran programs -.SH SYNOPSIS -.B struct -[ option ] ... -file -.SH DESCRIPTION -.LP -.I Struct -translates the Fortran program specified by -.I file -(standard input default) -into a Ratfor program. -Wherever possible, Ratfor control constructs -replace the original Fortran. -Statement numbers appear only where still necessary. -Cosmetic changes are made, including changing Hollerith strings -into quoted strings -and relational operators into symbols (.e.g. `.GT.' into `>'). -The output is appropriately indented. -.PP -The following options may occur in any order. -.TP -.B \-s -Input is accepted in standard format, i.e. -comments are specified by a c, C, or * in column 1, and continuation lines -are specified by a nonzero, nonblank character in column 6. -Normally, a statement whose first nonblank character -is not alphanumeric is treated as a continuation. -.TP -.B \-i -Do not turn computed goto statements into -switches. -(Ratfor does not turn switches back -into computed goto statements.) -.TP -.B \-a -Turn sequences of else ifs into a -non-Ratfor switch of the form -.IP -.nf -.ta 5 7 -switch { - case pred1: code - case pred2: code - case pred3: code - default: code - } -.fi -.DT -.IP -The case predicates are tested in order; -the code appropriate to only one case is executed. -This generalized form of switch statement does not -occur in Ratfor. -.TP -.B \-b -Generate goto's instead of multilevel break statements. -.TP -.B \-n -Generate goto's instead of multilevel next statements. -.TP -.TP -.BI \-e n -If -.I n -is 0 (default), -place code within a loop only if it can -lead to an iteration of the loop. -If -.I n -is nonzero, -admit code segments with fewer than -.I n -statements to a loop -if otherwise the loop would have exits to several places including the segment, -and the segment can be reached only from the loop. -.SH FILES -/tmp/struct* -.br -/usr/lib/struct/* -.SH SEE ALSO -f77(1) -.SH BUGS -Struct knows Fortran 66 syntax, but not full Fortran 77 -(alternate returns, IF...THEN...ELSE, etc.) -.br -If an input Fortran program contains identifiers which -are reserved words in Ratfor, the structured -version of the program -will not be a valid Ratfor program. -.br -Extended range DO's generate cryptic errors. -.br -Columns 73-80 are not special even when -.B \-s -is in effect. -.br -Will not generate Ratfor FOR statements. //GO.SYSIN DD struct.1 echo stty.1 sed 's/.//' >stty.1 <<'//GO.SYSIN DD stty.1' -.TH STTY 1 -.SH NAME -stty \- set terminal options -.SH SYNOPSIS -.B stty -[ option ... ] -.SH DESCRIPTION -.I Stty -sets certain I/O options on the current output terminal. -With no argument, it reports the current settings of the options. -The option strings are -selected from the following set: -.TP 8n -.B even -allow even parity -.br -.ns -.TP -.B \-even -disallow even parity -.br -.ns -.TP -.B odd -allow odd parity -.br -.ns -.TP -.B \-odd -disallow odd parity -.br -.ns -.TP -.B raw -raw mode input -(no erase, kill, interrupt, quit, EOT; parity bit passed back) -.br -.ns -.TP -.B \-raw -negate raw mode -.br -.ns -.TP -.B cooked -same as `\-raw' -.br -.ns -.TP -.B cbreak -make each character available to -.IR read (2) -as received; no erase and kill -.br -.ns -.TP -.B \-cbreak -make characters available to -.I read -only when newline is received -.br -.ns -.TP -.B \-nl -allow carriage return for new-line, -and output CR-LF for carriage return or new-line -.br -.ns -.TP -.B nl -accept only new-line to end lines -.br -.ns -.TP -.B echo -echo back every character typed -.br -.ns -.TP -.B \-echo -do not echo characters -.br -.ns -.TP -.B lcase -map upper case to lower case -.br -.ns -.TP -.B \-lcase -do not map case -.br -.ns -.TP -.B \-tabs -replace tabs by spaces when printing -.br -.ns -.TP -.B tabs -preserve tabs -.br -.ns -.TP -.B ek -reset erase and kill characters back to normal # and @ -.br -.ns -.TP -.BI erase \ c\fR -set erase character to -.IR c . -.I C -can be of the form -.I `^X' -which is interpreted as a `control X'. -.br -.ns -.TP -.BI kill \ c\fR -set kill character to -.IR c . -.I `^X' -works here also. -.br -.ns -.TP -.B cr0 cr1 cr2 cr3 -.br -select style of delay for carriage return (see -.IR ioctl (2)) -.br -.ns -.TP -.B nl0 nl1 nl2 nl3 -.br -select style of delay for linefeed -.br -.ns -.TP -.B tab0 tab1 tab2 tab3 -.br -select style of delay for tab -.br -.ns -.TP -.B ff0 ff1 -select style of delay for form feed -.br -.ns -.TP -.B bs0 bs1 -select style of delay for backspace -.br -.ns -.TP -.B tty33 -set all modes suitable for the -Teletype Corporation Model 33 terminal. -.br -.ns -.TP -.B tty37 -set all modes suitable for the -Teletype Corporation Model 37 terminal. -.br -.ns -.TP -.B vt05 -set all modes suitable for Digital Equipment Corp. VT05 terminal -.br -.ns -.TP -.B tn300 -set all modes suitable for a General Electric TermiNet 300 -.br -.ns -.TP -.B ti700 -set all modes suitable for Texas Instruments 700 series terminal -.br -.ns -.TP -.B tek -set all modes suitable for Tektronix 4014 terminal -.br -.ns -.TP -.B hup -hang up dataphone on last close. -.br -.ns -.TP -.B \-hup -do not hang up dataphone on last close. -.br -.ns -.TP -.B 0 -hang up phone line immediately -.br -.ns -.TP -.B "50 75 110 134 150 200 300 600 1200 1800 2400 4800 9600 exta extb" -.br -Set terminal baud rate to the number given, if possible. -(These are the speeds supported by the DH-11 interface). -.dt -.SH "SEE ALSO" -ioctl(2), tabs(1) //GO.SYSIN DD stty.1 echo su.1 sed 's/.//' >su.1 <<'//GO.SYSIN DD su.1' -.TH SU 1 -.SH NAME -su \- substitute user id temporarily -.SH SYNOPSIS -.B su -[ userid ] -.SH DESCRIPTION -.I Su -demands the password of the specified -.I userid, -and if it is given, -changes to that -.I userid -and invokes the Shell -.IR sh (1) -without changing the current directory or the -user environment (see -.IR environ (5)). -The new user ID stays in force until the Shell exits. -.PP -If no -.I userid -is specified, `root' is assumed. -To remind the super-user of his responsibilities, -the Shell substitutes `#' for its usual prompt. -.SH "SEE ALSO" -sh(1) //GO.SYSIN DD su.1 echo sum.1 sed 's/.//' >sum.1 <<'//GO.SYSIN DD sum.1' -.TH SUM 1 -.SH NAME -sum \- sum and count blocks in a file -.SH SYNOPSIS -.B sum -file -.SH DESCRIPTION -.I Sum -calculates and prints a 16-bit checksum for the named file, -and also prints the number of blocks in the file. -It is typically used to look for bad spots, or -to validate a file communicated over -some transmission line. -.SH "SEE ALSO" -wc(1) -.SH DIAGNOSTICS -`Read error' -is indistinuishable from end of file on -most devices; check the block count. //GO.SYSIN DD sum.1 echo sync.1m sed 's/.//' >sync.1m <<'//GO.SYSIN DD sync.1m' -.TH SYNC 1M -.SH NAME -sync \- update the super block -.SH SYNOPSIS -.B sync -.SH DESCRIPTION -.I Sync -executes the -.I sync -system primitive. -If the system is to be stopped, -.I sync -must be called to insure -file system integrity. -See -.IR sync (2) -for details. -.SH "SEE ALSO" -sync(2), update(8) //GO.SYSIN DD sync.1m echo tabs.1 sed 's/.//' >tabs.1 <<'//GO.SYSIN DD tabs.1' -.TH TABS 1 -.SH NAME -tabs \- set terminal tabs -.SH SYNOPSIS -.B tabs -[ -.B \-n -] [ -terminal -] -.SH DESCRIPTION -.I Tabs -sets the tabs on a variety of terminals. -Various of the terminal names given in -.IR term (7) -are recognized; -the default is, however, suitable for most 300 -baud terminals. -If the -.B \-n -flag is present then the left -margin is not indented as is normal. -.SH SEE ALSO -stty(1), term(7) //GO.SYSIN DD tabs.1 echo tail.1 sed 's/.//' >tail.1 <<'//GO.SYSIN DD tail.1' -.TH TAIL 1 -.SH NAME -tail \- deliver the last part of a file -.SH SYNOPSIS -.B tail -.if t [ \(+-number[\fBlbc\fR] ] -.if n +_number[lbc___] -[ file ] -.SH DESCRIPTION -.I Tail -copies the named file to the standard output beginning -at a designated place. -If no file is named, the standard input is used. -.PP -Copying begins at distance -.I +number -from the beginning, or -.I \-number -from the end of the input. -.I Number -is counted in units of lines, blocks or characters, -according to the appended option -.B l, -.B b -or -.B c. -When no units are specified, counting is by lines. -.SH "SEE ALSO" -dd(1) -.SH BUGS -Tails relative to the end of the file -are treasured up in a buffer, and thus -are limited in length. -Various kinds of anomalous behavior may happen -with character special files. //GO.SYSIN DD tail.1 echo tar.1 sed 's/.//' >tar.1 <<'//GO.SYSIN DD tar.1' -.TH TAR 1 -.SH NAME -tar \- tape archiver -.SH SYNOPSIS -.B tar -[ key ] [ name ... ] -.SH DESCRIPTION -.I Tar -saves and restores files -on magtape. -Its actions are controlled by the -.I key -argument. -The -.I key -is a string of characters containing -at most one function letter and possibly -one or more function modifiers. -Other arguments to the command are file or directory -names specifying which files are to be dumped or restored. -In all cases, appearance of a directory name refers to -the files and (recursively) subdirectories of that directory. -.PP -The function portion of -the key is specified by one of the following letters: -.TP 8 -.B r -The named files -are written -on the end of the tape. -The -.B c -function implies this. -.TP 8 -.B x -The named files are extracted from the tape. -If the named file matches a directory whose contents -had been written onto the tape, this directory is (recursively) extracted. -The owner, modification time, and mode are restored (if possible). -If no file argument is given, the entire content of the -tape is extracted. -Note that if multiple entries specifying the same file -are on the tape, the last one overwrites -all earlier. -.TP 8 -.B t -The names of the specified files are listed each time they occur -on the tape. -If no file argument is given, -all of the names on the tape are listed. -.TP 8 -.B u -The named files are added to the tape if either they -are not already there or have -been modified since last put on the tape. -.TP 8 -.B c -Create a new tape; writing begins on the beginning -of the tape instead of after the last file. -This command implies -.B r. -.PP -The following characters may be used in addition to the letter -which selects the function desired. -.TP 10 -.B 0,...,7 -This -modifier selects the drive on which the tape is mounted. -The default is -.BR 1 . -.TP 10 -.B v -Normally -.I tar -does its work silently. -The -.B v -(verbose) -option causes it to type the name of each file it treats -preceded by the function letter. -With the -.B t -function, -.B v -gives more information about the -tape entries than just the name. -.TP 10 -.B w -causes -.I tar -to print the action to be taken followed by file name, then -wait for user confirmation. If a word beginning with `y' -is given, the action is performed. Any other input means -don't do it. -.TP 10 -.B f -causes -.I tar -to use the next argument as the name of the archive instead -of /dev/mt?. -If the name of the file is `\-', tar writes to -standard output or reads from standard input, whichever is -appropriate. Thus, -.I tar -can be used as the head or tail of a filter chain -.I Tar -can also be used to move hierarchies with the command -.ce 1 -cd fromdir; tar cf - . | (cd todir; tar xf -) -.TP 10 -.B b -causes -.I tar -to use the next argument as the blocking factor for tape -records. The default is 1, the maximum is 20. This option -should only be used with raw magnetic tape archives (See -.B f -above). -The block size is determined automatically when reading -tapes (key letters `x' and `t'). -.TP 10 -.B l -tells -.I tar -to complain if it cannot resolve all of the links -to the files dumped. If this is not specified, no -error messages are printed. -.TP 10 -.B m -tells -.I tar -to not restore the modification times. -The mod time -will be the time of extraction. -.PP -.SH FILES -/dev/mt? -.br -/tmp/tar* -.SH DIAGNOSTICS -Complaints about bad key characters and tape read/write errors. -.br -Complaints if enough memory is not available to hold -the link tables. -.SH BUGS -There is no way to ask for the -.IR n -th -occurrence of a file. -.br -Tape errors are handled ungracefully. -.br -The -.B u -option can be slow. -.br -The -.B b -option should not be used with archives that are -going to be updated. The current magtape driver cannot -backspace raw magtape. -If the archive is on a disk file the -.B b -option should not be used at all, as updating -an archive stored in this manner can destroy it. -.br -The current limit on file name length is -100 characters. //GO.SYSIN DD tar.1 echo tbl.1 sed 's/.//' >tbl.1 <<'//GO.SYSIN DD tbl.1' -.TH TBL 1 -.SH NAME -tbl \- format tables for nroff or troff -.SH SYNOPSIS -.B tbl -[ files ] ... -.SH DESCRIPTION -.I Tbl -is a preprocessor for formatting tables for -.I nroff -or -.IR troff (1). -The input files are copied to the standard output, -except for lines between .TS and .TE -command lines, which are assumed to describe tables -and reformatted. -Details are given in the reference manual. -.PP -As an example, letting \\t represent a tab (which should -be typed as a genuine tab) -the input -.IP "" -\&.TS -.nf -c s s -c c s -c c c -l n n. -Household Population -Town\\tHouseholds -\\tNumber\\tSize -Bedminster\\t789\\t3.26 -Bernards Twp.\\t3087\\t3.74 -Bernardsville\\t2018\\t3.30 -Bound Brook\\t3425\\t3.04 -Branchburg\\t1644\\t3.49 -Bridgewater\\t7897\\t3.81 -Far Hills\\t240\\t3.19 -\&.TE -.LP -.fi -yields -.ne 10 -.IP " " -.TS -.nr 35 \n(.u -.nf -.nr 79 0n -.nr 80 \n(79 -.nr 40 \n(79 -.nr 38 \n(79+\w!Town! -.if \n(80<\n(38 .nr 80 \n(38 -.nr 38 \n(79+\w!! -.if \n(80<\n(38 .nr 80 \n(38 -.nr 38 \n(79+\w!Bedminster! -.if \n(80<\n(38 .nr 80 \n(38 -.nr 38 \n(79+\w!Bernards Twp.! -.if \n(80<\n(38 .nr 80 \n(38 -.nr 38 \n(79+\w!Bernardsville! -.if \n(80<\n(38 .nr 80 \n(38 -.nr 38 \n(79+\w!Bound Brook! -.if \n(80<\n(38 .nr 80 \n(38 -.nr 38 \n(79+\w!Branchburg! -.if \n(80<\n(38 .nr 80 \n(38 -.nr 38 \n(79+\w!Bridgewater! -.if \n(80<\n(38 .nr 80 \n(38 -.nr 38 \n(79+\w!Far Hills! -.if \n(80<\n(38 .nr 80 \n(38 -.nr 81 \n(80 -.nr 41 \n(80 -.nr 38 \n(80+\w!Number! -.if \n(81<\n(38 .nr 81 \n(38 -.nr 31 0 -.nr 32 0 -.nr 38 \w!789! -.if \n(31<\n(38 .nr 31 \n(38 -.nr 38 \w!! -.if \n(32<\n(38 .nr 32 \n(38 -.nr 38 \w!3087! -.if \n(31<\n(38 .nr 31 \n(38 -.nr 38 \w!! -.if \n(32<\n(38 .nr 32 \n(38 -.nr 38 \w!2018! -.if \n(31<\n(38 .nr 31 \n(38 -.nr 38 \w!! -.if \n(32<\n(38 .nr 32 \n(38 -.nr 38 \w!3425! -.if \n(31<\n(38 .nr 31 \n(38 -.nr 38 \w!! -.if \n(32<\n(38 .nr 32 \n(38 -.nr 38 \w!1644! -.if \n(31<\n(38 .nr 31 \n(38 -.nr 38 \w!! -.if \n(32<\n(38 .nr 32 \n(38 -.nr 38 \w!7897! -.if \n(31<\n(38 .nr 31 \n(38 -.nr 38 \w!! -.if \n(32<\n(38 .nr 32 \n(38 -.nr 38 \w!240! -.if \n(31<\n(38 .nr 31 \n(38 -.nr 38 \w!! -.if \n(32<\n(38 .nr 32 \n(38 -.nr 61 \n(80+\n(31 -.nr 38 \n(61+\n(32 -.if \n(38>\n(81 .nr 81 \n(38 -.if \n(38<\n(81 .nr 61 +(\n(81-\n(38)/2 -.nr 82 \n(81 -.nr 42 \n(81 -.nr 38 \n(81+\w!Size! -.if \n(82<\n(38 .nr 82 \n(38 -.nr 31 0 -.nr 32 0 -.nr 38 \w!3! -.if \n(31<\n(38 .nr 31 \n(38 -.nr 38 \w!.26! -.if \n(32<\n(38 .nr 32 \n(38 -.nr 38 \w!3! -.if \n(31<\n(38 .nr 31 \n(38 -.nr 38 \w!.74! -.if \n(32<\n(38 .nr 32 \n(38 -.nr 38 \w!3! -.if \n(31<\n(38 .nr 31 \n(38 -.nr 38 \w!.30! -.if \n(32<\n(38 .nr 32 \n(38 -.nr 38 \w!3! -.if \n(31<\n(38 .nr 31 \n(38 -.nr 38 \w!.04! -.if \n(32<\n(38 .nr 32 \n(38 -.nr 38 \w!3! -.if \n(31<\n(38 .nr 31 \n(38 -.nr 38 \w!.49! -.if \n(32<\n(38 .nr 32 \n(38 -.nr 38 \w!3! -.if \n(31<\n(38 .nr 31 \n(38 -.nr 38 \w!.81! -.if \n(32<\n(38 .nr 32 \n(38 -.nr 38 \w!3! -.if \n(31<\n(38 .nr 31 \n(38 -.nr 38 \w!.19! -.if \n(32<\n(38 .nr 32 \n(38 -.nr 62 \n(81+\n(31 -.nr 38 \n(62+\n(32 -.if \n(38>\n(82 .nr 82 \n(38 -.if \n(38<\n(82 .nr 62 +(\n(82-\n(38)/2 -.nr 38 \n(79+\w!Household Population!-\n(82 -.if \n(38>0 .nr 38 \n(38/2 -.if \n(38<0 .nr 38 0 -.nr 61 +1*\n(38 -.nr 81 +1*\n(38 -.nr 41 +1*\n(38 -.nr 62 +2*\n(38 -.nr 82 +2*\n(38 -.nr 42 +2*\n(38 -.nr 38 \n(80+\w!Households!-\n(82 -.if \n(38>0 .nr 38 \n(38/1 -.if \n(38<0 .nr 38 0 -.nr 62 +1*\n(38 -.nr 82 +1*\n(38 -.nr 42 +1*\n(38 -.nr 38 1n -.nr 41 +3*\n(38 -.nr 81 +3*\n(38 -.nr 61 +3*\n(38 -.if n .if \n(61%24>0 .nr 61 +12u -.nr 42 +6*\n(38 -.nr 82 +6*\n(38 -.nr 62 +6*\n(38 -.if n .if \n(62%24>0 .nr 62 +12u -.nr TW \n(82 -.fc ! : -.ta \n(82u -\&!:Household Population:! -.ta \n(80u \n(82u -\&\h'|\n(40u'!:Town:!\h'|\n(41u'!:Households:! -.ta \n(80u \n(81u \n(82u -\&\h'|\n(40u'!::!\h'|\n(41u'!:Number:!\h'|\n(42u'!:Size:! -.ta \n(80u \n(61u \n(62u \n(82u -\&\h'|\n(40u'!Bedminster:!\h'|\n(41u'!:789!\h'|\n(42u'!:3!!.26:! -.ta \n(80u \n(61u \n(62u \n(82u -\&\h'|\n(40u'!Bernards Twp.:!\h'|\n(41u'!:3087!\h'|\n(42u'!:3!!.74:! -.ta \n(80u \n(61u \n(62u \n(82u -\&\h'|\n(40u'!Bernardsville:!\h'|\n(41u'!:2018!\h'|\n(42u'!:3!!.30:! -.ta \n(80u \n(61u \n(62u \n(82u -\&\h'|\n(40u'!Bound Brook:!\h'|\n(41u'!:3425!\h'|\n(42u'!:3!!.04:! -.ta \n(80u \n(61u \n(62u \n(82u -\&\h'|\n(40u'!Branchburg:!\h'|\n(41u'!:1644!\h'|\n(42u'!:3!!.49:! -.ta \n(80u \n(61u \n(62u \n(82u -\&\h'|\n(40u'!Bridgewater:!\h'|\n(41u'!:7897!\h'|\n(42u'!:3!!.81:! -.ta \n(80u \n(61u \n(62u \n(82u -\&\h'|\n(40u'!Far Hills:!\h'|\n(41u'!:240!\h'|\n(42u'!:3!!.19:! -.fc -.mk ## -.nr ## -1v -.if \n(35>0 .fi -.TE -.fi -.PP -If no arguments are given, -.I tbl -reads the standard input, -so it may be used as a filter. -When it is used with -.I eqn -or -.I neqn -the -.I tbl -command should be first, to minimize the volume -of data passed through -pipes. -.SH SEE ALSO -troff(1), eqn(1) -.br -M. E. Lesk, -.I TBL. //GO.SYSIN DD tbl.1 echo tc.1 sed 's/.//' >tc.1 <<'//GO.SYSIN DD tc.1' -.TH TC 1 -.SH NAME -tc \- photypesetter simulator -.SH SYNOPSIS -.B tc -[ -.B \-t -] -[ -.B \-s\c -N -] -[ -.B \-p\c -L -] -[ -file -] -.SH DESCRIPTION -.I Tc -interprets its -input (standard input default) -as device codes for a Graphic Systems phototypesetter (cat). -The standard output of -.I tc -is intended for a Tektronix 4015 (a 4014 teminal -with ASCII and APL character sets). -The sixteen typesetter sizes are mapped into the 4014's -four sizes; -the entire TROFF character set is drawn using the 4014's -character generator, -using overstruck combinations where necessary. -Typical usage: -.IP "" 15 -troff \-t file | tc -.PP -At the end of each page -.I tc -waits for a newline (empty line) from the keyboard before -continuing on to the next page. -In this wait state, the command -.B e -will suppress the screen erase before the next page; -.B s\c -N will cause the next N pages to be skipped; -and -.B !\c -line will send line to the shell. -.PP -The command line options are: -.TP -.B \-t -Don't wait between pages; for directing output into a file. -.TP -.BR \-s N -Skip the first N pages. -.TP -.BR \-p L -Set page length to L. -L may include the scale factors -.B p -(points), -.B i -(inches), -.B c -(centimeters), -and -.B P -(picas); -default is picas. -.TP -.BI \(fm\- l\ w \(fm -Multiply the default aspect ratio, 1.5, of a displayed page -by -.I l/w. -.SH "SEE ALSO" -troff(1), -plot(1) -.SH BUGS -Font distinctions are lost. -.br -The aspect ratio option is unbelievable. //GO.SYSIN DD tc.1 echo tee.1 sed 's/.//' >tee.1 <<'//GO.SYSIN DD tee.1' -.TH TEE 1 -.SH NAME -tee \- pipe fitting -.SH SYNOPSIS -.B tee -[ -.B \-i -] [ -.B \-a -] -[ file ] ... -.SH DESCRIPTION -.I Tee -transcribes the standard input to the standard -output and makes copies in the -.I files. -Option -.B \-i -ignores interrupts; -option -.B \-a -causes the output to be appended to the -.I files -rather than overwriting them. //GO.SYSIN DD tee.1 echo test.1 sed 's/.//' >test.1 <<'//GO.SYSIN DD test.1' -.TH TEST 1 -.SH NAME -test \- condition command -.SH SYNOPSIS -.B test -expr -.SH DESCRIPTION -.I test -evaluates the expression -.IR expr , -and if its value is true then returns zero exit status; otherwise, a -non zero exit status is returned. -.I test -returns a non zero exit if there are no arguments. -.PP -The following primitives are used to construct -.IR expr . -.TP 9n -.BR \-r " file" -true if the file exists and is readable. -.TP -.BR \-w " file" -true if the file exists and is writable. -.TP -.BR \-f " file" -true if the file exists and is not a directory. -.TP -.BR \-d " file" -true if the file exists and is a directory. -.TP -.BR \-s " file" -true if the file exists and has a size greater than zero. -.TP -.BR \-t " [ fildes ]" -true if the open file whose file descriptor number is -.I fildes -(1 by default) -is associated with a terminal device. -.TP -.BR \-z " s1" -true if the length of string -.I s1 -is zero. -.TP -.BR \-n " s1" -true if the length of the string -.I s1 -is nonzero. -.TP -.RB s1 " = " s2 -true -if the strings -.I s1 -and -.I s2 -are equal. -.TP -.RB s1 " != " s2 -true -if the strings -.I s1 -and -.I s2 -are not equal. -.TP -s1 -true if -.I s1 -is not the null string. -.TP -.RB n1 " \-eq " n2 -true if the integers -.I n1 -and -.I n2 -are algebraically equal. -Any of the comparisons -.BR \-ne , -.BR \-gt , -.BR \-ge , -.BR \-lt , -or -.BR \-le -may be used in place of -.BR \-eq . -.PP -These primaries may be combined with the -following operators: -.TP -.B ! -unary negation operator -.TP -.B \-a -binary -.I and -operator -.TP -.B \-o -binary -.I or -operator -.TP -.BR "( " "expr" " )" -parentheses for grouping. -.PP -.B \-a -has higher precedence than -.B \-o. -Notice that all the operators and flags are separate -arguments to -.IR test . -Notice also that parentheses are meaningful -to the Shell and must be escaped. -.SH "SEE ALSO" -sh(1), find(1) //GO.SYSIN DD test.1 echo time.1 sed 's/.//' >time.1 <<'//GO.SYSIN DD time.1' -.TH TIME 1 -.SH NAME -time \- time a command -.SH SYNOPSIS -.B time -command -.SH DESCRIPTION -The -given command is executed; after it is complete, -.I time -prints the elapsed time during the command, the time -spent in the system, and the time spent in execution -of the command. -Times are reported in seconds. -.PP -The execution time can depend on what kind of memory -the program happens to land in; -the user time in MOS is often half what it is in core. -.PP -The times are printed on the diagnostic output stream. -.SH BUGS -Elapsed time is accurate to the second, -while the CPU times are measured -to the 60th second. -Thus the sum of the CPU times can be up to a second larger -than the elapsed time. //GO.SYSIN DD time.1 echo tk.1 sed 's/.//' >tk.1 <<'//GO.SYSIN DD tk.1' -.TH TK 1 -.SH NAME -tk \- paginator for the Tektronix 4014 -.SH SYNOPSIS -.B tk -[ -.B \-t -] -[ -.B \-\c -.I N -] -[ -.B \-p\c -.I L -] -[ -file -] -.SH DESCRIPTION -The output of -.I tk -is intended for a Tektronix 4014 terminal. -.I Tk -arranges for 66 lines to fit on the screen, -divides the screen into -.I N -columns, -and -contributes an eight space page offset -in the (default) single-column case. -Tabs, spaces, and backspaces are collected and plotted -when necessary. -Teletype Model 37 half- and reverse-line sequences -are interpreted and plotted. -At the end of each page -.I tk -waits for a newline (empty line) from the keyboard before -continuing on to the next page. -In this wait state, the command -.BI ! command -will send the -.I command -to the shell. -.PP -The command line options are: -.TP -.B \-t -Don't wait between pages; for directing output into a file. -.PP -.TP -.BI \- N -Divide the screen into \fIN\fR columns and -wait after the last column. -.TP -.BI \-p L -Set page length to \fIL\fR -lines. -.SH SEE ALSO -pr(1) //GO.SYSIN DD tk.1 echo touch.1 sed 's/.//' >touch.1 <<'//GO.SYSIN DD touch.1' -.TH TOUCH 1 -.SH NAME -touch \- update date last modified of a file -.SH SYNOPSIS -.B touch -[ -.B \-c -] -file ... -.SH DESCRIPTION -.I Touch -attempts to set the modified date of each -.I file. -This is done by reading a character from the file -and writing it back. -.PP -If a -.I file -does not exist, -an attempt will be made to create it unless the -.B \-c -option is specified. //GO.SYSIN DD touch.1 echo tp.1 sed 's/.//' >tp.1 <<'//GO.SYSIN DD tp.1' -.TH TP 1 deprecated -.SH NAME -tp \- manipulate tape archive -.SH SYNOPSIS -.B tp -[ key ] [ name ... ] -.SH DESCRIPTION -.I Tp -saves and restores files -on DECtape or magtape. -Its actions are controlled by the -.I key -argument. -The key is a string of characters containing -at most one function letter and possibly -one or more function modifiers. -Other arguments to the command are file or directory -names specifying which files are to be dumped, restored, -or listed. -In all cases, appearance of a directory name refers to -the files and (recursively) subdirectories of that directory. -.PP -The function portion of -the key is specified by one of the following letters: -.TP 8 -.B r -The named files -are written -on the tape. -If files with the same names -already exist, they are replaced. -`Same' is determined by string comparison, so -`./abc' can never be the same as `/usr/dmr/abc' even -if `/usr/dmr' is the current directory. -If no file argument is given, `\fB.\fR' is the default. -.TP 8 -.B u -updates the tape. -.B u -is like -.B r, -but a file is replaced only if its -modification date is later than the date stored on the tape; -that is to say, if it has changed since it was dumped. -.B u -is the default command if none is given. -.TP 8 -.B d -deletes the named files from -the tape. -At least one name argument must be given. -This function is not permitted on magtapes. -.TP 8 -.B x -extracts the named files from the tape to the file system. -The owner and mode are restored. -If no file argument is given, the entire contents of the -tape are extracted. -.TP 8 -.B t -lists the names of the specified files. -If no file argument is given, -the entire contents of the tape is listed. -.PP -The following characters may be used in addition to the letter -which selects the function desired. -.TP 10 -.B m -Specifies magtape as opposed to DECtape. -.TP 10 -.B 0,...,7 -This -modifier selects the drive on which the tape is mounted. -For DECtape, -.B x -is default; for magtape -`0' is the default. -.TP 10 -.B v -Normally -.I tp -does its work silently. -The -.B v -(verbose) -option causes it to type the name of each file it treats -preceded by the function letter. -With the -.B t -function, -.B v -gives more information about the -tape entries than just the name. -.TP 10 -.B c -means a fresh dump is being created; the tape directory -is cleared before beginning. -Usable only with -.B r -and -.B u. -This option is assumed with magtape since -it is impossible to selectively overwrite -magtape. -.TP 10 -.B i -Errors reading and writing the -tape are noted, but no action is taken. -Normally, errors cause a return to the command level. -.TP 10 -.B f -Use the first named file, rather than a tape, -as the archive. -This option is known to work only with -.BR x . -.TP 10 -.B w -causes -.I tp -to pause before treating each file, type -the indicative letter and the file name (as with -.BR v ) -and await the user's response. -Response -.B y -means `yes', so the file is treated. -Null response -means `no', and the file does not take part -in whatever is being done. -Response -.B x -means `exit'; -the -.I tp -command terminates immediately. -In the -.B x -function, -files previously asked about -have been extracted already. -With -.B "r, u," -and -.B d -no change has been made to the tape. -.PP -.SH FILES -/dev/tap? -.br -/dev/mt? -.SH SEE ALSO -ar(1), tar(1) -.SH DIAGNOSTICS -Several; the non-obvious one is -`Phase error', which means the file changed after it was selected for -dumping but before it was dumped. -.SH BUGS -A single file with several links to it is treated like several files. -.PP -Binary-coded control information makes -magnetic tapes written by -.I tp -difficult to carry to other machines; -.IR tar (1) -avoids the problem. //GO.SYSIN DD tp.1 echo tr.1 sed 's/.//' >tr.1 <<'//GO.SYSIN DD tr.1' -.TH TR 1 -.SH NAME -tr \- translate characters -.SH SYNOPSIS -.B tr -[ -.B \-cds -] [ string1 [ string2 ] ] -.SH DESCRIPTION -.I Tr -copies the standard input to the standard output with -substitution or deletion of selected characters. -Input characters found in -.I string1 -are mapped into the corresponding characters of -.IR string2 . -When -.I string2 -is short it is padded to the length of -.I string1 -by duplicating its last character. -Any combination of the options -.B \-cds -may be used: -.B \-c -complements the set of characters in -.I string1 -with respect to the universe of characters -whose ASCII codes are 01 through 0377 octal; -.B \-d -deletes all input characters in -.I string1; -.B \-s -squeezes all strings of repeated output characters that are -in -.I string2 -to single characters. -.PP -In either string the notation -.IB a \- b -means a range of characters from -.I a -to -.I b -in increasing ASCII order. -The character -`\e' followed by 1, 2 or 3 octal digits stands for the -character whose ASCII code is given by those digits. -A `\e' followed by any other character stands -for that character. -.PP -The following example creates a list of all -the words in `file1' one per line in `file2', -where a word is taken to be a maximal string of alphabetics. -The second string is quoted -to protect `\e' from the Shell. -012 is the ASCII code for newline. -.IP -tr \-cs A\-Za\-z \'\e012\' file2 -.SH "SEE ALSO" -ed(1), ascii(7) -.SH BUGS -Won't handle ASCII NUL in -.I string1 -or -.I string2; -always deletes NUL from input. //GO.SYSIN DD tr.1 echo troff.1 sed 's/.//' >troff.1 <<'//GO.SYSIN DD troff.1' -.TH TROFF 1 -.SH NAME -troff, nroff \- text formatting and typesetting -.SH SYNOPSIS -.B troff -[ option ] ... -[ file ] ... -.PP -.B nroff -[ option ] ... -[ file ] ... -.SH DESCRIPTION -.I Troff -formats text in the named -.I files -for -printing on a Graphic Systems C/A/T phototypesetter; -.I nroff -for typewriter-like devices. -Their capabilities are described in the -.I Nroff/Troff user's manual. -.PP -If no -.I file -argument is present, the standard input is read. -An argument consisting of a single minus -.RB ( \- ) -is taken to be -a file name corresponding to the standard input. -The options, which may appear in any order so long as they appear -before the files, are: -.TP "\w'\f3\-m\f1name 'u" -.BI \-o list -Print only pages whose page numbers appear in -the comma-separated -.I list -of numbers and ranges. -A range -.IB N \- M -means pages -.I N -through -.IR M ; -an initial -.I \-N -means -from the beginning to page -.IR N ; -and a final -.IR N \- -means -from -.I N -to the end. -.TP -.BI \-n N -Number first generated page -.IR N . -.TP -.BI \-s N -Stop every -.I N -pages. -.I Nroff -will halt prior to every -.I N -pages (default -.IR N =1) -to allow paper loading or -changing, and will resume upon receipt of a newline. -.I Troff -will stop the phototypesetter every -.I N -pages, -produce a trailer to allow changing cassettes, -and resume when the typesetter's start button is pressed. -.TP -.BI \-m name -Prepend the macro file -.BI /usr/lib/tmac/tmac. name -to the input -.IR files . -.TP -.BI \-r aN -Set register -.I a -(one-character) to -.IR N . -.TP -.B \-i -Read standard input after the input files are exhausted. -.TP -.B \-q -Invoke the simultaneous input-output mode of the -.B rd -request. -.HP -.bd I 3 -.I Nroff only -.br -.bd I -.TP -.BI \-T name -Prepare output for specified terminal. -Known -.I names -are -.B 37 -for the (default) -Teletype Corporation Model 37 terminal, -.B tn300 -for the GE TermiNet\ 300 (or any terminal without half-line -capability), -.B 300S -for the \s-1DASI\s+1-300S, -.B 300 -for the \s-1DASI\s+1-300, -and -.B 450 -for the \s-1DASI\s+1-450 -(Diablo Hyterm). -.TP -.B \-e -Produce equally-spaced words in adjusted -lines, using full terminal resolution. -.TP -.B \-h -Use output tabs during horizontal spacing -to speed output and reduce output character count. -Tab settings are assumed to be every -8 nominal character widths. -.HP -.bd I 3 -.I Troff only -.br -.bd I -.TP -.B \-t -Direct output to the standard output instead -of the phototypesetter. -.TP -.B \-f -Refrain from feeding out paper and stopping -phototypesetter at the end of the run. -.TP -.B \-w -Wait until phototypesetter is available, if -currently busy. -.TP -.B \-b -Report whether the phototypesetter -is busy or available. -No text processing is done. -.TP -.B \-a -Send a printable ASCII approximation -of the results to the standard output. -.TP -.BR \-p N -Print all characters in point size -.I N -while retaining all prescribed spacings and motions, -to reduce phototypesetter elasped time. -.TP -.B \-g -Prepare output for a GCOS -phototypesetter and direct it to the standard output -(see -.IR gcat (1)). -.PP -If the file -.I /usr/adm/tracct -is writable, -.I troff -keeps phototypesetter accounting records there. -The integrity of that file may be secured by making -.I troff -a `set user-id' program. -.SH FILES -.ta \w'/usr/lib/tmac/tmac.* 'u -/usr/lib/suftab suffix hyphenation tables -.br -/tmp/ta* temporary file -.br -/usr/lib/tmac/tmac.* standard macro files -.br -/usr/lib/term/* terminal driving tables for -.I nroff -.br -/usr/lib/font/* font width tables for -.I troff -.br -/dev/cat phototypesetter -.br -/usr/adm/tracct accounting statistics for /dev/cat -.SH "SEE ALSO" -J. F. Ossanna, -.I Nroff/Troff user's manual -.br -B. W. Kernighan, -.I -A TROFF Tutorial -.br -eqn(1), tbl(1) -.br -col(1), tk(1) -.RI ( nroff -only) -.br -tc(1), gcat(1) -.RI ( troff -only) //GO.SYSIN DD troff.1 echo true.1 sed 's/.//' >true.1 <<'//GO.SYSIN DD true.1' -.TH TRUE 1 -.SH NAME -true, false \- provide truth values -.SH SYNOPSIS -.B true -.PP -.B false -.SH DESCRIPTION -.I True -does nothing, successfully. -.I False -does nothing, unsuccessfully. -They are typically used in input to -.IR sh (1) -such as: -.PP - while true -.br - do -.br - command -.br - done -.SH "SEE ALSO" -sh(1) -.SH DIAGNOSTICS -.I True -has exit status zero, -.I false -nonzero. //GO.SYSIN DD true.1 echo tsort.1 sed 's/.//' >tsort.1 <<'//GO.SYSIN DD tsort.1' -.TH TSORT 1 -.SH NAME -tsort \- topological sort -.SH SYNOPSIS -.B tsort -[ file ] -.SH DESCRIPTION -.I Tsort -produces on the standard output a totally ordered list of items -consistent with a partial ordering of items -mentioned in the input -.IR file . -If no -.I file -is specified, the standard input is understood. -.PP -The input consists of pairs of items (nonempty strings) -separated by blanks. -Pairs of different items indicate ordering. -Pairs of identical items indicate presence, but not ordering. -.SH "SEE ALSO" -lorder(1) -.SH DIAGNOSTICS -Odd data: there is an odd number of fields in the input file. -.SH BUGS -Uses a quadratic algorithm; -not worth fixing for the typical use of ordering -a library archive file. //GO.SYSIN DD tsort.1 echo tty.1 sed 's/.//' >tty.1 <<'//GO.SYSIN DD tty.1' -.TH TTY 1 -.SH NAME -tty \- get terminal name -.SH SYNOPSIS -.B tty -.SH DESCRIPTION -.I Tty -prints the pathname of the user's terminal. -.SH DIAGNOSTICS -`not a tty' if the standard input file is not a terminal. //GO.SYSIN DD tty.1 echo uniq.1 sed 's/.//' >uniq.1 <<'//GO.SYSIN DD uniq.1' -.TH UNIQ 1 -.SH NAME -uniq \- report repeated lines in a file -.SH SYNOPSIS -.B uniq -[ -.B \-udc -[ -.BR + n -] [ -.BR \- n -] -] [ input [ output ] ] -.SH DESCRIPTION -.I Uniq -reads the input -file comparing adjacent lines. -In the normal case, the second and succeeding copies -of repeated lines are -removed; the remainder is written on the output file. -Note that repeated lines must be adjacent -in order to be found; -see -.IR sort (1). -If the -.B \-u -flag is used, -just the lines that are not repeated -in the original file are output. -The -.B \-d -option specifies that -one copy of just the repeated lines is to -be written. -The normal mode output is the union of the -.B \-u -and -.B \-d -mode outputs. -.PP -The -.B \-c -option supersedes -.B \-u -and -.B \-d -and generates -an output report in default style -but with each line preceded by a count of the -number of times it occurred. -.PP -The -.I n -arguments specify skipping an initial portion of each line -in the comparison: -.TP 8 -.BI \- n -The first -.IR n -fields -together with any blanks before each are ignored. -A field is defined as a string of non-space, non-tab characters -separated by tabs and spaces from its neighbors. -.TP 8 -.BI + n -The first -.IR n -characters are ignored. -Fields are skipped before characters. -.PP -.SH "SEE ALSO" -sort(1), comm(1) //GO.SYSIN DD uniq.1 echo units.1 sed 's/.//' >units.1 <<'//GO.SYSIN DD units.1' -.if n .ds / / -.if t .ds / \z/\h'\w'*'u' -.TH UNITS 1 -.SH NAME -units \- conversion program -.SH SYNOPSIS -.B units -.SH DESCRIPTION -.I Units -converts quantities expressed -in various standard scales to -their equivalents in other scales. -It works interactively in this fashion: -.PP -.I " You have:" -inch -.br -.I " You want:" -cm -.br -.I " * 2.54000e+00 -.br -.I " \*/ 3.93701e\-01 -.PP -A quantity is specified as a multiplicative combination of -units optionally preceded by a numeric multiplier. -Powers are indicated by suffixed positive integers, -division by the usual sign: -.PP -.I " You have:" -15 pounds force/in2 -.br -.I " You want:" -atm -.br -.I " * 1.02069e+00" -.br -.I " \*/ 9.79730e\-01" -.PP -.I Units -only does multiplicative scale changes. -Thus it can convert Kelvin to Rankine, but not Centigrade to -Fahrenheit. -Most familiar units, -abbreviations, and metric prefixes are recognized, -together with a generous leavening of exotica -and a few constants of nature including: -.PP -.nf - pi ratio of circumference to diameter - c speed of light - e charge on an electron - g acceleration of gravity - force same as g - mole Avogadro's number - water pressure head per unit height of water - au astronomical unit -.PP -.fi -`Pound' is a unit of -mass. -Compound names are run together, e.g. `lightyear'. -British units that differ from their US counterparts -are prefixed thus: `brgallon'. -Currency is denoted `belgiumfranc', `britainpound', ... -.PP -For a complete list of units, `cat /usr/lib/units'. -.SH FILES -/usr/lib/units -.SH BUGS -Don't base your -financial plans on the currency conversions. //GO.SYSIN DD units.1 echo uucp.1c sed 's/.//' >uucp.1c <<'//GO.SYSIN DD uucp.1c' -.TH UUCP 1C -.SH NAME -uucp, uulog \- unix to unix copy -.SH SYNOPSIS -.B uucp -[ option ] ... -source-file ... destination-file -.PP -.B uulog -[ option ] ... -.SH DESCRIPTION -.I Uucp -copies files named by the source-file arguments -to the destination-file argument. -A file name may be a path name on your machine, or may -have the form -.IP -system-name!pathname -.LP -where `system-name' is taken from a list of system names -which -.I uucp -knows about. -Shell metacharacters ?*[] appearing in the pathname part -will be expanded on the appropriate system. -.PP -Pathnames may be one of -.IP (1) -a full pathname; -.IP (2) -a pathname preceded by -.IR ~user ; -where -.I user -is a userid on the specified system -and is replaced by that user's login directory; -.IP (3) -anything else is prefixed by the current directory. -.PP -If the result is an erroneous pathname for the remote system -the copy will fail. -If the destination-file is a directory, the last part of the -source-file name is used. -.ig -If a simple -.I ~user -destination is inaccessible to -.I uucp, -data is copied to a spool directory and the user -is notified by -.IR mail (1). -.. -.PP -.I Uucp -preserves execute permissions across the transmission -and gives 0666 read and write permissions (see -.IR chmod (2)). -.PP -The following options are interpreted by -.IR uucp . -.TP -.B \-d -Make all necessary directories for the file copy. -.TP -.B \-c -Use the source file when copying out rather than -copying the file to the spool directory. -.TP -.B \-m -Send mail to the requester when the copy is complete. -.PP -.I Uulog -maintains a summary log -of -.I uucp -and -.IR uux (1) -transactions in the file -`/usr/spool/uucp/LOGFILE' by gathering -information from partial log files named `/usr/spool/uucp/LOG.*.?'. -It removes the partial log files. -.PP -The options cause -.I uulog -to print logging information: -.TP -.BI \-s sys -Print information about work involving system -.I sys. -.TP -.BI \-u user -Print information about work done for the specified -.I user. -.SH FILES -/usr/spool/uucp - spool directory -.br -/usr/lib/uucp/* - other data and program files -.SH SEE ALSO -uux(1), mail(1) -.br -D. A. Nowitz, -.I Uucp Implementation Description -.SH WARNING -The domain of remotely accessible files can -(and for obvious security reasons, usually should) -be severely restricted. -You will very likely not be able to fetch files -by pathname; -ask a responsible person on the remote system to -send them to you. -For the same reasons you will probably not be able -to send files to arbitrary pathnames. -.SH BUGS -.br -All files received by -.I uucp -will be owned by uucp. -.br -The \-m option will only work sending files or receiving -a single file. -(Receiving multiple files specified by special shell -characters ?*[] will not activate -the \-m option.) //GO.SYSIN DD uucp.1c echo uux.1c sed 's/.//' >uux.1c <<'//GO.SYSIN DD uux.1c' -.TH UUX 1C -.SH NAME -uux \- unix to unix command execution -.SH SYNOPSIS -.B uux -[ -.B \- -] -command-string -.SH DESCRIPTION -.I Uux -will gather 0 or more files from various systems, -execute a command on a specified system -and send standard output to a file on a specified -system. -.PP -The command-string is made up of one or more arguments that look -like a shell command line, -except that the command and file names -may be prefixed by system-name!. -A null system-name is interpreted as the local system. -.PP -File names may be one of -.IP -(1) a full pathname; -.IP -(2) a pathname preceded by -.IR ~xxx ; -where -.I xxx -is a userid on the specified system -and is replaced by that user's login directory; -.br -.IP -(3) anything else is prefixed by the current directory. -.PP -The `\-' option will cause the standard input to the -.I uux -command to be the standard input to the command-string. -.PP -For example, the command -.IP -uux "!diff usg!/usr/dan/f1 pwba!/a4/dan/f1 > !fi.diff" -.PP -will get the f1 files from the usg and pwba machines, -execute a -.I diff -command -and put the results in f1.diff in the local directory. -.PP -Any special shell characters such as <>;| should be quoted either -by quoting the entire command-string, or quoting the special -characters as individual arguments. -.SH FILES -/usr/uucp/spool - spool directory -.br -/usr/uucp/* - other data and programs -.SH SEE ALSO -uucp(1) -.br -D. A. Nowitz, -.I Uucp implementation description -.SH WARNING -An installation may, and for security reasons -generally will, limit the list of -commands executable on behalf of an incoming request from -.I uux. -Typically, a restricted site will permit little other than -the receipt of mail via -.I uux. -.SH BUGS -Only the first command of a shell pipeline may -have a system-name!. -All other commands are executed on the system of the first -command. -.br -The use of the shell metacharacter -.B * -will probably not do what you want it to do. -.br -The shell tokens << and >> are not implemented. -.br -There is no notification of denial of execution -on the remote machine. //GO.SYSIN DD uux.1c echo wait.1 sed 's/.//' >wait.1 <<'//GO.SYSIN DD wait.1' -.TH WAIT 1 -.SH NAME -wait \- await completion of process -.SH SYNOPSIS -.B wait -.SH DESCRIPTION -Wait until all processes started with -.B & -have completed, -and report on abnormal terminations. -.PP -Because the -.IR wait (2) -system call -must be executed in the parent process, -the Shell itself executes -.I wait, -without creating a new process. -.SH "SEE ALSO" -sh(1) -.SH BUGS -Not all the processes of a 3- or more-stage -pipeline are children of the Shell, and -thus can't be waited for. //GO.SYSIN DD wait.1 echo wall.1m sed 's/.//' >wall.1m <<'//GO.SYSIN DD wall.1m' -.TH WALL 1M -.SH NAME -wall \- write to all users -.SH SYNOPSIS -.B /etc/wall -.SH DESCRIPTION -.I Wall -reads its standard input until an end-of-file. -It then sends this message, -preceded by -`Broadcast Message ...', -to all logged in users. -.PP -The sender should be super-user to override -any protections the users may have invoked. -.SH FILES -/dev/tty? -.br -/etc/utmp -.SH "SEE ALSO" -mesg(1), write(1) -.SH DIAGNOSTICS -`Cannot send to ...' when the open on -a user's tty file fails. //GO.SYSIN DD wall.1m echo wc.1 sed 's/.//' >wc.1 <<'//GO.SYSIN DD wc.1' -.TH WC 1 -.SH NAME -wc \- word count -.SH SYNOPSIS -.B wc -[ -.B \-lwc -] -[ name ... ] -.SH DESCRIPTION -.I Wc -counts lines, words and characters in the named files, -or in the standard input if no name appears. -A word is a maximal string of characters -delimited by spaces, tabs or newlines. -.PP -If the optional argument is present, -just the specified counts (lines, words or characters) -are selected by the letters -.BR l , -.BR w , -or -.BR c . //GO.SYSIN DD wc.1 echo who.1 sed 's/.//' >who.1 <<'//GO.SYSIN DD who.1' -.TH WHO 1 -.SH NAME -who \- who is on the system -.SH SYNOPSIS -.B who -[ who-file ] [ -.B "am I" -] -.SH DESCRIPTION -.I Who, -without an argument, -lists the login name, terminal name, and login time -for each current UNIX user. -.PP -Without an argument, -.I who -examines the /etc/utmp -file to obtain its information. -If a file is given, that file is examined. -Typically the given file will be /usr/adm/wtmp, -which contains a record of all the logins since it -was created. -Then -.I who -lists -logins, logouts, and crashes since the creation of -the wtmp file. -Each login is listed with user name, -terminal name (with `/dev/' -suppressed), -and date and time. -When an argument is given, logouts produce a similar line without a user name. -Reboots produce a line with `x' in the place of the device name, -and a fossil time indicative of when the system went down. -.PP -With two arguments, -as in `who am I' (and also `who are you'), -.I who -tells who you are logged in as. -.SH FILES -/etc/utmp -.SH "SEE ALSO" -getuid(2), utmp(5) //GO.SYSIN DD who.1 echo write.1 sed 's/.//' >write.1 <<'//GO.SYSIN DD write.1' -.TH WRITE 1 -.SH NAME -write \- write to another user -.SH SYNOPSIS -.B write -user [ ttyname ] -.SH DESCRIPTION -.I Write -copies lines from your terminal to that of -another user. -When first called, -it sends the message -.PP - Message from yourname yourttyname... -.PP -The recipient of the message should write back at this point. -Communication continues until an end of file is -read from the terminal or an interrupt is sent. -At that point -.I write -writes `EOT' on the other terminal and exits. -.PP -If you want to write to a user who is logged in more than once, -the -.I ttyname -argument may be used to indicate the -appropriate terminal name. -.PP -Permission to write may be denied or granted by use of the -.I mesg -command. -At the outset writing is allowed. -Certain commands, in particular -.I nroff -and -.IR pr (1) -disallow -messages in order to prevent messy output. -.PP -If the character `!' is found at the beginning of a line, -.I write -calls the shell -to execute the rest of the -line as a command. -.PP -The following protocol is suggested for using -.IR write : -when you first write to another user, wait for him to -write back before starting to send. -Each party should end each message with a distinctive -signal\(em\fB(o)\fR -for `over' is conventional\(emthat the other may reply. -.B (oo) -for `over and out' is suggested when conversation -is about to be terminated. -.SH FILES -/etc/utmp to find user -.br -/bin/sh to execute `!' -.SH "SEE ALSO" -mesg(1), who(1), mail(1) //GO.SYSIN DD write.1 echo xsend.1 sed 's/.//' >xsend.1 <<'//GO.SYSIN DD xsend.1' -.TH "XSEND, XGET, ENROLL" 1 -.SH NAME -xsend, xget, enroll \- secret mail -.SH SYNOPSIS -.B xsend -person -.br -.B xget -.br -.B enroll -.SH DESCRIPTION -These commands implement a secure communication -channel; -it is like -.IR mail (1), -but no one can read the messages except the intended recipient. -The method embodies a public-key cryptosystem using knapsacks. -.PP -To receive messages, use -.IR enroll ; -it asks you for a password that you must subsequently quote -in order to receive secret mail. -.PP -To receive secret mail, -use -.IR xget . -It asks for your password, then gives you the messages. -.PP -To send secret mail, use -.IR xsend -in the same manner as the ordinary mail command. -(However, it will accept only one target). -A message announcing the receipt of secret mail is also sent -by ordinary mail. -.SH FILES -/usr/spool/secretmail/*.key: keys -/usr/spool/secretmail/*.[0-9]: messages -.SH SEE ALSO -mail (1) -.SH BUGS -It should be integrated with ordinary mail. -The announcement of secret mail makes traffic analysis possible. //GO.SYSIN DD xsend.1 echo yacc.1 sed 's/.//' >yacc.1 <<'//GO.SYSIN DD yacc.1' -.TH YACC 1 -.SH NAME -yacc \- yet another compiler-compiler -.SH SYNOPSIS -.B yacc -[ -.B \-vd -] -grammar -.SH DESCRIPTION -.I Yacc -converts a context-free grammar into a set of -tables for a simple automaton which executes an LR(1) parsing -algorithm. -The grammar may be ambiguous; -specified precedence rules are used to break ambiguities. -.PP -The output file, -.IR y.tab.c , -must be compiled by the C compiler -to produce a program -.IR yyparse . -This program must be loaded with the lexical analyzer program, -.IR yylex , -as well as -.I main -and -.IR yyerror , -an error handling routine. -These routines must be supplied by the user; -.IR Lex (1) -is useful for creating lexical analyzers usable by -.IR yacc . -.PP -If the -.B \-v -flag is given, the file -.I y.output -is prepared, which contains a description of the parsing tables -and a report on -conflicts generated by ambiguities in the grammar. -.PP -If the \-\fBd\fR flag is used, the file -.I y.tab.h -is generated with the -.I define -statements that associate the -.I yacc\c --assigned `token codes' with the user-declared `token names'. -This allows source files other than -.I y.tab.c -to access the token codes. -.SH FILES -.ta \w'yacc.tmp, yacc.acts 'u -y.output -.br -y.tab.c -.br -y.tab.h defines for token names -.br -yacc.tmp, yacc.acts temporary files -.br -/usr/lib/yaccpar parser prototype for C programs -.br -/lib/liby.a library with default `main' and `yyerror' -.SH "SEE ALSO" -.IR lex (1) -.br -.I "LR Parsing" -by A. V. Aho and S. C. Johnson, -Computing Surveys, June, 1974. -.br -.I "YACC \- Yet Another Compiler Compiler" -by S. C. Johnson. -.SH DIAGNOSTICS -The number of reduce-reduce and shift-reduce conflicts -is reported on the standard output; -a more detailed report is -found in the -.I y.output -file. -Similarly, if some rules are not reachable from the -start symbol, this is also reported. -.SH BUGS -Because file names are fixed, at most one -.I yacc -process can be active in a given directory at -a time. //GO.SYSIN DD yacc.1