home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!noc.near.net!hri.com!spool.mu.edu!darwin.sura.net!haven.umd.edu!decuac!pa.dec.com!decprl!decprl!boyd
- From: boyd@prl.dec.com (Boyd Roberts)
- Newsgroups: comp.unix.shell
- Subject: Re: How to redirect outputs from the command "time" into a file?
- Message-ID: <1992Nov7.155128.27140@prl.dec.com>
- Date: 7 Nov 92 15:51:28 GMT
- References: <1992Nov5.024837.6571@cs.tulane.edu> <fish.720983465@news2.gsfc.nasa.gov> <1992Nov6.231410.28155@ccd.harris.com>
- Sender: news@prl.dec.com (USENET News System)
- Organization: Digital Equipment Corporation - Paris Research Laboratory
- Lines: 27
- Nntp-Posting-Host: prl313.prl.dec.com
-
- In article <1992Nov6.231410.28155@ccd.harris.com>, zhu@controls.ccd.harris.com (Gary Zhu) writes:
- >
- > "time" will consider the rest of the line as a whole, so
-
- Nonsense.
-
- > time a.out 2>a.time
- >
- > will be interpreted as : run "a.out 2>a.time" and report the
- > running time of "a.out 2>a.time".
- >
-
- time will be handed one argument. Commands _never_ see I/O redirections.
- I/O redirections are performed by the shell. This is UNIX, not DOS.
-
- > SOLUTION : (time a.out) 2>a.time
- >
- > Gary
-
- Which is functionally equivalent to:
-
- time a.out 2> a.time
-
-
- Boyd Roberts boyd@prl.dec.com
-
- ``Not only is UNIX dead, it's starting to smell really bad.'' -- Rob Pike
-