bash 'time' function

Soren Jacobsen devsoren at attbi.com
Thu Dec 20 21:20:50 PST 2001


On Thu, Dec 20, 2001 at 11:39:52PM -0500, Chris F.A. Johnson wrote:
> On Fri, 21 Dec 2001, R. Bosch wrote:
> 
> 	{ time sleep 3s } 2> >( grep sys )

You need a semicolon in a group command like that. Where are you
redirecting stderr? Perhaps you meant 2>&1. Why are you redirecting
stdout to grep in a subshell? Did you mean to pipe it? If so, why the
subshell? 

{ time yourprogram &>/dev/null } 2>&1 | grep sys

soren:~$ { time ls -R /usr/local &>/dev/null; } 2>&1 | grep sys
sys     0m0.600s

Tada!

|===================|
|<')                |
|(__) Soren Jacobsen|
|^  ^               |
|===================|

-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe blfs-support' in the subject header of the message



More information about the blfs-support mailing list