Re: redirect time to file
On Fri, Apr 17, 2009 at 15:12:36 -0500, Boyd Stephen Smith Jr. (bss@iguanasuicide.net) wrote:
> In <[🔎] a7e963770904171300k2e0bdccdq125f89eb886e9896@mail.gmail.com>, Erik
> Xavior wrote:
> >$ time echo hi > file
> >
> >real 0m0.000s
> >user 0m0.000s
> >sys 0m0.000s
> >$
> >
> >why doesn't it redirect the:
> >
> >real 0m0.000s
> >user 0m0.000s
> >sys 0m0.000s
> >
> >to the "file"?
> >
> >even
> >time echo hi 2>&1 > file
> >doesnt work :O
>
> This is specific to bash, and only when using the time built-in. Try your
> re-direction with:
> command time echo hi
And to do the write to file, try:
command time -o file echo hi
which is equivalent to
/usr/bin/time -o file echo hi
--
Bob Cox. Stoke Gifford, near Bristol, UK.
Please reply to the list only. Do NOT send copies directly to me.
Debian on the NSLU2: http://bobcox.com/slug/
Reply to: