Thread View: comp.os.msdos.programmer
7 messages
7 total messages
Started by Edward R Sova
Fri, 22 Jan 1993 18:44
tee for DOS?
Author: Edward R Sova
Date: Fri, 22 Jan 1993 18:44
Date: Fri, 22 Jan 1993 18:44
11 lines
981 bytes
981 bytes
Where can I get the Unix tee command for DOS? You can split redirection and piping. like maybe foo | tee > prn >logfile. Well I'm not sure of the syntax, and I don't care right now, but I think you see what I want. Where is it? Thanx ___ \ \ Mr. Ed on rollerblades? Nah, that's: _\ \ esova@magnus.acs.ohio-state.edu Prodigy:CBGX09A \_____\ but his friends call him Ed, o o o o yeah that Ed Sova Kid, he answers to anything.
Re: tee for DOS?
Author: Timo Salmi
Date: Fri, 22 Jan 1993 20:09
Date: Fri, 22 Jan 1993 20:09
21 lines
1552 bytes
1552 bytes
In article <1993Jan22.184439.27754@magnus.acs.ohio-state.edu> esova@magnus.acs.ohio-state.edu (Edward R Sova) writes: >Where can I get the Unix tee command for DOS? You can split redirection and Have you checked the contents list 9906 Nov 12 10:57 garbo.uwasa.fi:/pc/unix/0unix.zip "If you do not know how to go about getting this material, users are welcome to email me for the prerecorded garbo.uwasa.fi instructions (long, circa 29Kb). North American users are referred to the Garbo mirror on wuarchive.wustl.edu. Australian users are referred to the archie.au mirror. For the Asian users there is the NCTUCCCA.edu.tw mirror. The mirrors may lag occasionally, or might not have all the files. If you do not receive my reply within five days, please ask your own site's system manager to construct a returnable mail path for you". .................................................................. Prof. Timo Salmi Co-moderator of comp.archives.msdos.announce Moderating at garbo.uwasa.fi anonymous FTP archives 128.214.87.1 Faculty of Accounting & Industrial Management; University of Vaasa Internet: ts@uwasa.fi Bitnet: salmi@finfun ; SF-65101, Finland
Re: tee for DOS?
Author: Stefan Strack
Date: Fri, 22 Jan 1993 21:28
Date: Fri, 22 Jan 1993 21:28
12 lines
1062 bytes
1062 bytes
In article <1993Jan22.184439.27754@magnus.acs.ohio-state.edu> esova@magnus.acs.ohio-state.edu (Edward R Sova) writes: >Where can I get the Unix tee command for DOS? You can split redirection and >piping. like maybe foo | tee > prn >logfile. Well I'm not sure of the >syntax, and I don't care right now, but I think you see what I want. Where >is it? Thanx > TEE (as well as Y) are internal commands of 4DOS, the command.com replacement. The syntax is foo | tee logfile | prn. Note that you can roll your own tee with just a few lines of code. Regards, Stefan (stst@vuse.vanderbilt.edu)
Re: tee for DOS?
Author: Timo Salmi
Date: Fri, 22 Jan 1993 23:39
Date: Fri, 22 Jan 1993 23:39
16 lines
1317 bytes
1317 bytes
In article <C19yB0.AJB@vuse.vanderbilt.edu> stst@vuse.vanderbilt.edu (Stefan Strack) writes: >In article <1993Jan22.184439.27754@magnus.acs.ohio-state.edu> esova@magnus.acs.ohio-state.edu (Edward R Sova) writes: >>Where can I get the Unix tee command for DOS? You can split redirection and >TEE (as well as Y) are internal commands of 4DOS, the command.com replacement. >The syntax is foo | tee logfile | prn. Note that you can roll your own tee >with just a few lines of code. An equally useful answer surely is that tee is available for Unix. (The 4DOSsers never let up :-). .................................................................. Prof. Timo Salmi Co-moderator of comp.archives.msdos.announce Moderating at garbo.uwasa.fi anonymous FTP archives 128.214.87.1 Faculty of Accounting & Industrial Management; University of Vaasa Internet: ts@uwasa.fi Bitnet: salmi@finfun ; SF-65101, Finland
Re: tee for DOS?
Author: Michael Spencer
Date: Sun, 24 Jan 1993 18:55
Date: Sun, 24 Jan 1993 18:55
27 lines
1305 bytes
1305 bytes
esova@magnus.acs.ohio-state.edu (Edward R Sova) writes:
>Where can I get the Unix tee command for DOS? You can split redirection and
>piping. like maybe foo | tee > prn >logfile. Well I'm not sure of the
>syntax, and I don't care right now, but I think you see what I want. Where
>is it? Thanx
Roll your own. Code goes something like this:
while (! feof(stdin)) {
fgets (str, 255, stdin);
fputs (str, stderr); // send to screen
fputs (str, stdout); // send whereever directed
}
fflush (stderr);
fflush (stdout);
close (dup(fileno(stdout))); // ensure flushing on stdout
--
===========================================================================
Michael Spencer | 2640 Borregas
spencer@cats.ucsc.edu | Aptos, CA 95003
===========================================================================
Re: tee for DOS?
Author: Rick Rankin
Date: Sun, 24 Jan 1993 23:59
Date: Sun, 24 Jan 1993 23:59
24 lines
1813 bytes
1813 bytes
In article <1993Jan22.233913.19275@uwasa.fi> ts@uwasa.fi (Timo Salmi) writes: > In article <C19yB0.AJB@vuse.vanderbilt.edu> stst@vuse.vanderbilt.edu (Stefan Strack) writes: > >In article <1993Jan22.184439.27754@magnus.acs.ohio-state.edu> esova@magnus.acs.ohio-state.edu (Edward R Sova) writes: > >>Where can I get the Unix tee command for DOS? You can split redirection and > > >TEE (as well as Y) are internal commands of 4DOS, the command.com replacement. > >The syntax is foo | tee logfile | prn. Note that you can roll your own tee > >with just a few lines of code. > > An equally useful answer surely is that tee is available for Unix. > (The 4DOSsers never let up :-). The fact the tee is available for Unix is immaterial. The man asked for tee for DOS. -- ============================================================================== | Rick Rankin | | | Motorola | Voice: 602-441-5726 | | Government Electronics Group | Fax: 602-441-2919 | | 8220 E. Roosevelt St. | Internet: rick@mel1.geg.mot.com | | Scottsdale, AZ 85252 | | | Mail Drop R4246 | | ==============================================================================
Re: tee for DOS?
Author: donl mathis
Date: Tue, 26 Jan 1993 02:45
Date: Tue, 26 Jan 1993 02:45
40 lines
1933 bytes
1933 bytes
In article <1juom5INNgak@darkstar.UCSC.EDU>, spencer@cats.ucsc.edu
(Michael Spencer) writes:
|>
|>
|> esova@magnus.acs.ohio-state.edu (Edward R Sova) writes:
|>
|> >Where can I get the Unix tee command for DOS? You can split
redirection and
|> >piping. like maybe foo | tee > prn >logfile. Well I'm not sure of the
|> >syntax, and I don't care right now, but I think you see what I want. Where
|> >is it? Thanx
|>
|> Roll your own. Code goes something like this:
|>
|> while (! feof(stdin)) {
|> fgets (str, 255, stdin);
|> fputs (str, stderr); // send to screen
|> fputs (str, stdout); // send whereever directed
|> }
|> fflush (stderr);
|> fflush (stdout);
|> close (dup(fileno(stdout))); // ensure flushing on stdout
Note that these are not the "tee" semantics that we all know and love.
The command line is
tee [ -i ] [ -a ] [ file ] ...
where -i is "ignore interrupts", which we don't care about, "-a" is to
append rather than overwrite existing files, and "file" and following
are the names of zero or more files into which a copy of stdin is
written, along with being sent to stdout.
So, technically, you'd want to open a vector of zero or more files, and
write each line into each of them as well as onto stdout. This is a
few more lines of code, but still not exactly a nightmare.
- donl mathis at Silicon Graphics Computer Systems, Mountain View, CA
donl@sgi.com
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads