![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MySQL Tuning Tools with mysqltuner.pl and tuning-primer.sh | Neo | Web Programming, Web 2.0 and Mashups | 2 | 10-14-2008 09:28 AM |
| Searching word in a file with awk | studieu | Shell Programming and Scripting | 3 | 07-09-2008 08:28 AM |
| Find Exactly word in grep command | koti_rama | UNIX for Dummies Questions & Answers | 4 | 08-23-2007 03:52 AM |
| searching word in files | naamas03 | UNIX for Dummies Questions & Answers | 2 | 11-06-2006 02:26 AM |
| Searching for key word within a file | moradwan | UNIX for Dummies Questions & Answers | 1 | 03-08-2006 12:31 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#8
|
|||
|
|||
|
Grepping using Perl
Hi senthilkumar_ak,
You can use Perl. It will give you better results than grep i think. Here are few tips for searching ... 1. do not store the file contents in an array, if the file size is huge 2. loop thru using the file handle ex: while (my $line = <FILE>) { 3. to make things faster, use variables as counters. If you want to match say 5 times ... you need not have to parse the entire file in loop, exit after 5 matches using a counter var. Regards, Visit my Perl blog for tips on Perl, TechDiary |
| Forum Sponsor | ||
|
|
|
#9
|
|||
|
|||
|
Thanks vikas.. I am beginner in perl i will use your tips, may be i will come up with some query to you if i encountered any errors.
|
|||
| Google The UNIX and Linux Forums |