Grep, Sed, Awk – The Unix Text Processing Trinity
2 points
1 hour ago
| 3 comments
| grep-sed-awk.com
| HN
thesuperbigfrog
9 minutes ago
[-]
grep, sed, and awk are nice simple tools but were followed by perl which is a more comprehensive tool and a complete programming language.

perl advanced the state of the art for regular expressions such that most regular expression implementations are "perl compatible".

From HN user unpythonic:

"When perl came out we were living in horrific times. You had the choice of either Bourne, C or Korn shell. Automation was glued together in one of these with a series of grep, awk, sed, ls, test, commands glued together.

Anything more complicated was written in C and called from one of these things. Perl in one stroke collapsed the programming of C, text manipulation, the capabilities of all of the Unix utilities, and data structures into one system. For anything which wasn't subsumed into the monolith of Perl, you could easy access via backticks. It was very friendly in dealing with text streams, and that's what those call-outs in those back ticks spoke.

Yes, awk and sed were replaced by Perl, but more importantly, the unmaintainable nightmare that glued all of it together was wiped out." Source: https://news.ycombinator.com/item?id=36650120

From "The Art of Unix Programming":

"Perl is shell on steroids. It was specifically designed to replace awk(1), and expanded to replace shell as the ‘glue’ for mixed-language script programming. It was first released in 1987." Source: http://www.catb.org/esr/writings/taoup/html/ch14s04.html#per...

It is good to know grep, sed, and awk, but it would be remiss to not include perl too. It is equally ubiquitous, more capable, and still developed and maintained with version 5.42.0 released last year: https://www.cpan.org/src/README.html

"On the scripting side, Perl has also returned to prominence. Once the undisputed leader in scripting, Perl declined after years of internal fragmentation and competition from newer languages. Recently, however, it has staged a comeback, reclaiming a position in the TIOBE top 10 since January 2018." Source: https://www.tiobe.com/tiobe-index/

But don't take my word for it, give it a try and see what you think: https://www.perl.org/get.html

reply
m4c-pl
1 hour ago
[-]
Three tools born in Bell Labs that still power every server, every pipeline, and every sysadmin's toolkit — over 50 years later. Learn their history and master them the right way.
reply
anthk
1 hour ago
[-]
awk can do grep and sed. Get the AWK programming language.
reply