On Monday 02 March 2009, John R Pierce <pie...@hogranch.com> wrote:
> SHARMILA JOTHIRAJAH wrote:
> > Is it possible to sent this 'time' output to a file...
> > If I try
> > time cmd1 someargs1 | cmd2 someargs2 > output.log
> >
> > it doesn't sent the "time" to the file...
>
> time (cmd1 someargs1 | cmd2 someargs2) > output.log
>
>
> the way you had it, it was only timing cmd1.  with the ( ), its spawning
> a subshell which should run both commands piped...

time also reports on stderr, not stdout.

time (cmd1 someargs1 | cmd2 someargs2) > output.log 2>&1

-- 
Even a sixth-grader can figure out that you can’t borrow money to pay off 
your debt

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to