Reply to post: Re: grep, sed & awk

In Search of Lost Time: GNU Grep 3.7 released with fix for 'extreme performance degradation'

Peter Gathercole Silver badge

Re: grep, sed & awk

Many people reach for Perl and Python for processing streams of characters. I found that a good understanding of awk has meant that I've never really needed to use either of these other two languages.

Sed is easy for relatively simple substitution, and can get complicated if you try to handle multiple pattern spaces, but can do some amazing things spanning multiple lines and different and conditional pattern substitutions, but I find I have to return to the manual most times I want to do anything complicated. Or do it in awk.

Awk can be treated much more as a traditional language with an input/output cycle with pattern matching built in. But it's very 'C' like, which makes it ideal for us old greybeards who cut our teeth on genetic UNIX back in the early years, when 'C' was what you had to know.

The only time I really switch to Perl is if I need to use OS features that are not really character orientated, like interacting with the networking layers, where there are readily built CPAN modules. And I still can't get my head around a language where indentation defines programming block structure and looping.

Python still seems important enough to keep trying, though.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon