delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT sources DOT redhat DOT com |
Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
Message-Id: | <200107061624.f66GOCi06188@cate1-208.reshall.ou.edu> |
To: | "Morrison, John" <cygwin AT cygwin DOT com> |
Subject: | Re: Timing problem |
In-Reply-To: | Your message of "Fri, 06 Jul 2001 09:37:16 BST." |
<CCD084B0E779D411A70300508B6622260183879F AT exchukahis02 DOT experian DOT co DOT uk> | |
Date: | Fri, 06 Jul 2001 11:24:11 -0500 |
From: | jcast AT cate1-208 DOT reshall DOT ou DOT edu |
> What made you think of the brackets? I think that the ls is being > piped into grep. This works on GNU/Linux: [jcast AT 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |