%%s 0/0/0 %%d D 1.1 25-Mar-82 12:15:29 v1.1 1 0 %%c Version 1.1 is the Spring 1982 Distribution of the LBL/Hughes release %%c of the Software Tools Virtual Operating System software and documentation. %%T %%I 1 #-h- tee.r 872 asc 25-mar-82 08:56:39 v1.1 (sw-tools v1.1) #-h- defns 168 asc 25-mar-82 08:56:19 v1.1 (sw-tools v1.1) # symbols definitions for tee # put on a file called 'defns' # used only by the tee tool define(MAXTEEFILES,arith(MAXOFILES,-,3)) #Number of output files allowed #-h- main 558 asc 25-mar-82 08:56:19 v1.1 (sw-tools v1.1) ## tee - copy input to standard output and named files DRIVER(tee) integer files (MAXTEEFILES) integer nf, int, i integer getarg, create character buf(MAXLINE) character getc character c call query("usage: tee [file] ...") nf = 0 for (i=1; getarg(i,buf,MAXLINE)!=EOF; i=i+1) { nf = nf + 1 if (nf > MAXTEEFILES) call error ("too many files.") files(nf) = create(buf,WRITE) if (files(nf) == ERR) call cant(buf) } while(getc(c) != EOF) { call putch(c,STDOUT) for (i=1; i<=nf; i=i+1) call putch(c, files(i)) } DRETURN end #-h- tee.fmt 345 asc 25-mar-82 08:56:41 v1.1 (sw-tools v1.1) .so ~bin/manhdr .hd Tee (1) 11-Jan-79 copy input to standard output and named files .sy tee [file] ... .ds Tee copies the standard input to the standard output and makes copies in the named files. .fl .sa The tool 'cat'; the tool 'crt'; the Unix command 'tee' .di A message is printed if the input file cannot be opened. .au Debbie Scherrer .bu %%E 1