help-bash
[Top][All Lists]
Advanced

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

Re: Counting words, fast!


From: Greg Wooledge
Subject: Re: Counting words, fast!
Date: Tue, 16 Mar 2021 18:24:40 -0400

On Tue, Mar 16, 2021 at 10:12:50PM +0000, Leonid Isaev (ifax) wrote:
> [lisaev@hyena tmp]$ time { bash a.sh < kjvbible.txt | sort -rnk1 &> 
> /dev/null; } 
> real  0m9.721s
> user  0m8.874s
> sys   0m0.813s

For the record, bash's time command can be used on a pipeline.  You
don't need to introduce the curly braces.

unicorn:~$ time echo hi | sleep 2
real 2.006  user 0.000  sys 0.003
unicorn:~$ type time
time is a shell keyword

Keywords have magical powers.



reply via email to

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