Hi I am wanting to time how long it takes a couple commands to run. I can do "time command" and it tells me. How do I do multple commands at a time. I tried: time command; command no good time "command; command" no good I can make a script I guess but thought there was a more elegant way. Thanks, jerry
On Tue, Apr 10, 2007 at 01:34:23PM -0400, Jerry Geis wrote:> Hi > > I am wanting to time how long it takes a couple commands to run. > I can do "time command" and it tells me. > How do I do multple commands at a time. > I tried: > time command; command > no good > time "command; command" > no goodIf using shell builtin time: time { cmd1; cmd2; } or time ( cmd1; cmd2 ) If using external command: /usr/bin/time sh -c "cmd1; cmd2" -- lfr 0/0 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: <http://lists.centos.org/pipermail/centos/attachments/20070410/0e547553/attachment-0004.sig>
On Tue, Apr 10, 2007 at 01:34:23PM -0400, Jerry Geis wrote:> I can do "time command" and it tells me.> time command; commandNo, because you're saying time command command> time "command; command"No because you're trying to run "command; command" What you want is time ( command ; command ) -- rgds Stephen
Maybe Matching Threads
- [PATCH] launch: switch from -nographic to -display none
- [PATCH v2 0/2] lib: qemu: Memoize qemu feature detection.
- running multiple commands in one system() call
- [PATCH 0/4] lib: qemu: Memoize qemu feature detection.
- [PATCH 0/4] lib: qemu: Add test for mandatory locking.