4 ms·
It has a great history, but the only thing I use it for anymore is splitting fields on whitespace, and that only because the 'cut' maintainers won't add this (t
by downerending 7y ago
It has a great history, but the only thing I use it for anymore is splitting fields on whitespace, and that only because the 'cut' maintainers won't add this (tiny) feature.
- samatman 7y agoFex is your new best friend! https://www.semicomplete.com/projects/fex/ https://www.semicomplete.com/projects/fex/
- yjftsjthsd-h 7y agoSo this is nice, but it needs to be installed. It feels dumb to use awk just to grab fields, but it's everywhere by default with no effort, and it works.
- downerending 7y agoThis is a real issue. In principle, we can often install whatever, but it takes years in the Linux world before one can assume that any given tool or feature is ubiquitous. And even then, things can fall apart. Python2 made it, but now it's going away. (Yes, there is a Python3 often present, but neither is a substitute for the other.)
- lousyd 7y agoUgh. Why braces ( { } )? That's the biggest tiny pain of using awk. It's an odd stretch for my fingers to type them and I have to look down to be sure I hit them right.
- samatman 7y agobraces are pretty well built into my muscle memory at this point, but I actually agree with you aesthetically, I would prefer square brackets `fex [1:3,5]`. I presume it's because of awk <shrug> Great tool though
- adrianN 7y agoUse one of the many tools for customizing your keyboard layout. {} are Alt+J and Alt+K for me.