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
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!