Boyd Stephen Smith Jr. wrote:

> In <4d9c342a.1090...@shadowcat.co.uk>, Chris Jackson wrote:
>>Boyd Stephen Smith Jr. wrote:
>>> GNU time 1.7
>>> bss@dellbuntu:~$ type time
>>> time is a shell keyword
>>> 
>>> (Bash has a time "builtin" that you should avoid if you want to use the
>>> time binary.)
>>
>>Actually it's a keyword not a builtin.
> 
> That's why I used quotes.  For most purposes it can be treated like a shell 
> builtin, but it's not really one.
> 
> Shell keywords are part of it's parser syntax,  ...


Yeah, I knew that ;) - I was wondering why. Given it's only recognised
at the start of the pipeline gives the clue I needed - it's so it can
time the whole pipeline rather than just a single command:

root@alice# time time dd if=/dev/urandom bs=1024 count=1024 | time gzip
-c -9 >/dev/null
1024+0 records in
1024+0 records out
1048576 bytes (1.0 MB) copied, 0.77579 s, 1.4 MB/s
0.00user 0.48system 0:00.77elapsed 62%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+248minor)pagefaults 0swaps
0.18user 0.00system 0:00.78elapsed 23%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+218minor)pagefaults 0swaps

real    0m0.785s
user    0m0.184s
sys     0m0.500s

Curiosity satisfied - thanks!

--
Chris Jackson
Shadowcat Systems Ltd.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4d9c6f5a.5040...@shadowcat.co.uk

Reply via email to