Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PERL or AWK

Status
Not open for further replies.

pmcmicha

Technical User
May 25, 2000
353
I have a very large access log to go through everyday and I am currently parsing this with ksh, but the cut statements are taking forever to complete. I know that PERL or AWK are better for this kind of text processing, but I was curious if one was any better than the other for this kind of processing. Thanks.
 
Hi:

It depends on the scope of your problem. Both awk and Perl are designed for text processing, but there's a lot more you can do with Perl. For example, Perl's file I-O and Regular Expresssions are superior to awks.

Without knowing your problem, I can say that cut has a smaller foot print than either awk or Perl. Of course, if you have a lot of cut commands, an awk or Perl might replace all the cuts thus speeding up the process.

Unless you're willing to do some experimenting, the best tool is still the one you know the best.

Regards,


Ed


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top