[Top][All Lists]

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

Re: [Help-bash] howto redirect time output to perl -pe "chomp;"?

From: Chet Ramey
Subject: Re: [Help-bash] howto redirect time output to perl -pe "chomp;"?
Date: Tue, 3 Jan 2017 11:31:20 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.6.0

On 1/3/17 11:07 AM, Larry Evans wrote:
> I've read and reread:
> and tried every permuation I could think of:

The key is that `time' is not a builtin command; it's a reserved word that
modifies an attribute of a command or pipeline.  The timing information
is printed by the shell after it executes the command or pipeline to
be timed.  So you need to run a timed command in a context where you
can capture the output of that context, like a subshell or group command.

``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]