'grep' is very slow when using it in a UTF-8 mode, specially for a large text file. However, it is fast if using 'C' mode. Use the command 'locale' to check the variable of 'LC_ALL'. Then
export LC_ALL="C"
(from http://tdas.wordpress.com/2008/02/03/speed-up-grep)
I tested it. The "C" mode is faster 50 times than the regular mode!
Showing posts with label speed. Show all posts
Showing posts with label speed. Show all posts
Tuesday, September 16, 2008
Linux:shell:command: speed up 'grep'
Subscribe to:
Posts (Atom)
