3 ms·
While I agree that Awk is cool, I suspect most *nix folks over a certain age already know it well. I use it regularly to munge input data. Its limitations forc
by vehemenz 6y ago
While I agree that Awk is cool, I suspect most *nix folks over a certain age already know it well. I use it regularly to munge input data.
Its limitations force you to solve problems in a creative way, and it can be a good programming exercise.
On the other hand, it can't handle UTF-8, which is annoying. (Yes, I know about Gawk).
- Mediterraneo10 6y agoWhile "most *nix folks over a certain age already know it well", IMO it would be a shame for it to limited to them. I regularly encounter younger developers unfamiliar with standard tools like sed, tr, cut, etc. that I use often to solve everyday personal tasks. The world took a wrong path when *nix tools were no longer seen as appropriate things for ordinary people to learn. (Yes, in the 1980s clerical staff in some companies were taught awk or even Emacs.) Productivity of the labour force would only rise. When my spouse moved to my country and didn’t yet know the local language, she worked for a multinational outsourcing firm. The job turned out to be little more than glorified data entry and it could have been easily automated with *nix tools piped. Hiring educated people to sit 8 hours a day and do everything manually was a waste of money and human potential.
- selfhoster11 6y ago> The world took a wrong path when nix tools were no longer seen as appropriate things for ordinary people to learn. Traditional nix tools come with a lot of UX baggage. A full programming language is likely better for some tasks, though *nix tools still have their place.
- klyrs 6y agoI've been using awk for about 20 years, but I've only scratched the surface -- "fetch a few columns from this file" sort of stuff. A colleague recently shared with me a significantly complex program that he'd written in awk, and it was certainly impressive... but walking through it with him didn't exactly convince me (a huge esolang nerd) that I should spend my working hours writing such monstrosities.
- vehemenz 6y agoIn The Awk Programming Language (the original book), the authors create a fully fledged database in Awk. I agree, it's impressive, but probably not the ideal use case. Your experience sounds similar to mine. Generally, my scripts are ad hoc and use only a handful of features at a time. They only need to be complex enough to get my data to the next stage in the pipeline, where another tool would probably work better.
- sergius 6y agoAnd then you moved to use Perl...