quilt-dev
[Top][All Lists]
Advanced

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

Re: [Quilt-dev] [patch 3/8] tac is not portable


From: Jean Delvare
Subject: Re: [Quilt-dev] [patch 3/8] tac is not portable
Date: Fri, 16 Sep 2005 19:07:57 +0200

Hi Dave,

[Dave Dodge]
> Bear in mind that "time" is a reserved word in bash and is considered
> part of the basic pipeline grammar.  It's applied to its entire
> pipeline, not just the first command.  From the bash "Pipelines" info
> node:
> 
>    The format for a pipeline is
>      [`time' [`-p']] [`!'] COMMAND1 [`|' COMMAND2 ...]
> 
> You can see the difference if you force the shell to use the
> non-builtin time program instead:
> 
>   $ /usr/bin/time true | sleep 1
>   0.00user 0.00system 0:00.01elapsed 0%CPU (0avgtext+0avgdata
>   0maxresident)k 0inputs+0outputs (102major+9minor)pagefaults 0swaps
> 
>   $ (/usr/bin/time true) | sleep 1
>   0.00user 0.00system 0:00.00elapsed 0%CPU (0avgtext+0avgdata
>   0maxresident)k 0inputs+0outputs (102major+9minor)pagefaults 0swaps
> 
> And the word "time" behaves as a normal command if you place it in the
> middle of the pipeline:
> 
>   $ true | time true | sleep 1
>   0.00user 0.00system 0:00.00elapsed 0%CPU (0avgtext+0avgdata
>   0maxresident)k 0inputs+0outputs (102major+9minor)pagefaults 0swaps

Thanks a lot for the explanations, it is all much clearer to me now :) I
didn't know that time was a bash built-in.

-- 
Jean Delvare




reply via email to

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