Re: time command

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



On Wed, Apr 11, 2007 at 01:13:36PM -0400, Bisbal, Prentice wrote:
> > $ time (echo a ; echo b)
> > a
> > b
> > 
> > real    0m0.001s
> > user    0m0.000s
> > sys     0m0.001s
> 
> What shell are you using? That doesn't work for me using Centos 4.4. My
> original command was time (ls; ls). I just tried you example and that
> doesn't work, either. I'm using bash. 

3.1.17 works (FC6); 3.00.16 doesn't (CentOS 4.4).

But the following works in every shell I tested (those before and also
2.05b, CentOS 3.8):
time { echo a; echo b; }
a
b

real    0m0.000s
user    0m0.000s
sys     0m0.000s

Note that the following *has* to work everywhere, but also includes the
penalty of starting a new shell:
time sh -c 'echo a; echo b'

-- 
lfr
0/0

Attachment: pgp1utwZe5BTq.pgp
Description: PGP signature

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux