Re: Optimizing grep, sort, uniq for speed

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



> *sigh*
> awk is not "cut". What you want is
> awk '{if (/[-\.0-9a-z][-\.0-9a-z]*.com/) { print $9;}}' | sort -u
>
> No grep needed; awk looks for what you want *first* this way.

Thanks, Mark.  This is cleaner code but it benchmarked slower than awk
then grep.

real    3m35.550s
user    2m7.186s
sys     0m27.793s

I'll run it a few more times to make sure that it wasn't some other
process slowing it down.

I really need to brush up some more on my awk skills!
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux