LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] [OT] perl and grep

[ILUG] [OT] perl and grep

Niall O Broin niall at linux.ie
Fri Mar 19 10:21:18 GMT 2004


On Friday 19 March 2004, Declan.Grady at nuvotem.com (Declan Grady) wrote:

>In the meantime I checked on the time thing.
>Using grep from the command line took over 3 minutes, and a perl script to
>open each sdy and check line number 5 for the words took 19 seconds !

When the question is text processing, the answer is usually perl. And my code
didn't check a specific line, because your grep didn't. So if you just check
the entire file as I did, it may be quicker (but not of course if the files
are big - I'm guessing they're not). However, having gone from 3 minutes to 19
seconds, you're not likely to notice incremental improvements.



Niall



More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell