On 4/19/07, Glenn Lagasse <[EMAIL PROTECTED]> wrote:
Atul Vidwansa wrote:
> HI,
> If I want to time a utility, Linux allows me to do something like:
>
> time -oa <filename> utility <arguments>
>
> which is convinient to put in shell script. On opensolaris, man page
> of time(1) does not show any such option. Isn't it possible to record
> output of time command (not of the utility invoked) in a file on
> opensolaris?
Not from the time(1) utility itself according to:
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/time/time.c
But it doesn't seem like it would be all that hard to add this
functionality in printt(). Might make a good RFE (if there isn't one
already).
Cheers,
--
Glenn Lagasse
But note that the time(1) utility writes to stderr, not stdout, so you
can just use redirection to get the output in a file:
/bin/time echo foo 2>/tmp/foo
foo
cat /tmp/foo
real 0.0
user 0.0
sys 0.0
Chad Mynhier
_______________________________________________
opensolaris-discuss mailing list
[email protected]