Timing problem
jcast@cate1-208.reshall.ou.edu
jcast@cate1-208.reshall.ou.edu
Fri Jul 6 09:21:00 GMT 2001
> What made you think of the brackets? I think that the ls is being
> piped into grep.
This works on GNU/Linux:
[jcast@cate1-208 jcast]$ (time ls) 2>&1 | egrep '^real'
real 0m0.020s
The redirections `|' and `>' have higher precidence in bash than
`time'. The parentheses are required to force the precedence you
want. (Actually, they are slightly more complicated, but that's the
gist.) However, `time' prints to the standard error, so you need to
redirect that into you pipe, with `2>&1'. If you just want to send
the output to a file, use `2> foo'.
Jon Cast
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list