by pram · 5y ago · 0 comments
That is the real problem I think. There is just no good reason to use it, and thus learn it. It doesn't do anything better than the alternatives. It's not "dead" but there is very little new blood entering the scene. It's a retirement home.
Sure you can call awk an antique tool being 44 years old, but its available on almost all unix-like systems even on router running busybox or bare minimum containers using alphine.
So its definitely a personal nitpick of mine calling a very relevant tool an antique.
No sane person is going to write an entire application in Awk anymore. But there are certainly 20 years old there who will encounter Awk while doing some command line data munging via SO and it will slowly become a tool in their toolbox.
Perl doesn't really have that. Sure you can ` | perl -e "..."` but honestly, I can do that with python/PHP too. I haven't encountered an SO answer for command line data processing hacks that have used perl in ages.
I could see that being useful in the 70s or 80s... but not today. No-one writes awk more than a line or two today that's nestled in some ci script that is never looked at again.
Yes, the tool is ubiquitous - its everywhere. It also happens to be part of the standard of what is on a machine which keeps it being used for those two liners.
However, people aren't writing applications in awk anymore.
Similarly, perl is going to go the same way. It's going to be useful for those 10-20 line data transformations that are in some data pipeline for munging data. But its not something that's continuing to grow and find its way as a first choice.
Writing a new application in awk is something that people do for the exercise - much like going and doing your own primitive photography with a cyanotype. It's done as a "yes, I understand it enough to do this complex thing." Perl is a bit further back... it's developing your own film. There are still some people who do that as a matter of their business - but its not a first choice anymore.
Cyanotypes and doing your own darkroom work are things of antiques in today's age. They're not gone - but doing things in them is more like going to the pioneer town and seeing how it used to be done rather than a practical choice for today.
It's still a popular tool in the data processing realm. It's crazy to think that bash scripts using pipes is still one of the most memory efficient ways of processing file-based data. Even tools like Apache Airflow just went ahead and incorporated bash for this exact reason.
A short example of that type of thing - https://people.sc.fsu.edu/~sshanbhag/awk-shell/histogram.awk
For the time, that was likely a very reasonable solution. But for today's world, there are better solutions.
It was _the_ choice to use to write web pages in at one point. I remember installing RedHat Linux, writing a support 'forum' message board thing in Perl, then chucking it away as everyone was starting to use ColdFusion, PHP and .NET