Search Postgresql Archives

Re: How to pipe the psql copy command to Unix 'Date' command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 02 March 2009, John R Pierce <pierce@xxxxxxxxxxxx> 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@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux