4 ms·
When people ask me why I say that the linux command line is the best dev environment, Awk is one of the tools I often point to. When you know even basic awk, y
by freedomben 3y ago
When people ask me why I say that the linux command line is the best dev environment, Awk is one of the tools I often point to. When you know even basic awk, you can do a lot with a little. IDEs actually start to feel clunky.
If you're looking to get into Awk, and you learn well from a lecture style, I put together a talk for Linux Fest Northwest some years ago and recorded it for Youtube: https://youtu.be/E5aQxIdjT0M https://youtu.be/E5aQxIdjT0M
- corytheboyd 3y agoHow does awk replace an IDE? I love awk, I love how powerful it is if you spend the time to learn it, but if I didn’t have an IDE I would be significantly less productive. Most of what an IDE does is help you understand and change code, not text editing operations. Not trying to say you’re wrong, just curious what your angle is with that statement.
- freedomben 3y agoThanks, to clarify, I don't mean that just awk replaces an IDE. I mean that the Linux command line replaces an IDE, specifically the functions like finding references, substitutions, transformations, etc. It doesn't replace syntax highlighting and stuff of course, though I get that from Vim. It's never going to be as powerful as a specialized IDE would for a specific language, but the Linux CLI is language agnostic and even works on just text files, so it's universally applicable and doesn't change depending on the language of the project. For me it's better than an IDE, but YMMV of course because everybody is different.
- brabel 3y agoI don't understand why you're associating AWK with Linux in particular... it seems it's available on Windows, BSD, MacOS and probably more.
- freedomben 3y agoOk yes, point taken, I just meant it as a general expression. I don't mean to imply that it's exclusive to Linux, although I do specifically prefer the GNU flavor of most of the tools (awk an exception where there are multiple interesting implementations), which do tend to be more closely associated with Linux than macos or BSD. A standard installation of any Linux distro will have them all available, whereas in Mac and Windows you have to specifically install them as they aren't part of the standard command line.
- brabel 3y agoMacOS comes with AWK and most other utilities... with a few just having different names. IMHO it's basically as extensive as GNU/Linux.
- freedomben 3y agoMacos does not come with the GNU utilities. You have to explicitly install them if you want them on macos. The included versions are BSD and similar licensed and are not all compatible with the GNU versions.
- makeitdouble 3y agoAt the same time unicode support was added super late (like 2 years ago ?), like any other shell tools passing content to awk by piping has edge cases (anything ressembling a CTRL+D sequence will cut the feed, and there must be dozens of other edge cases I have no idea about that will only bite me at the worst time. Awk is an impressive tool, but putting it on a pedastal blinds people from the weak spots and why they should probably move serious tasks to more specialized, but modern and adapted tools.
- themk 3y agoYou have to be trying pretty hard to make a CTRL-D cut the feed when piping into shell tools. That only comes into effect when the input is coming from a pty, and that only when it's in a very specific mode that is meant for interactive use.