3 ms·
I totally agree. awk, sed, grep are amazing and it astonishes me how many people aren't fluently able to write scripts in it. I used to be in that camp few mont
by thewhitetulip 7y ago
I totally agree. awk, sed, grep are amazing and it astonishes me how many people aren't fluently able to write scripts in it. I used to be in that camp few months earlier and I used to write everything in Python, but one day, I determined to learn shell scripting and I loved it.
awk::Python what Java::Python. What we can do in 10 lines of Python can be done in one line of awk and it doesn't have to be unreadable!
Main pain in the neck is finding a good tutorial. As usual, I started documenting what I learnt in an end to end guide here, https://github.com/thewhitetulip/awk-anti-textbook https://github.com/thewhitetulip/awk-anti-textbook
- perl4ever 7y agoIs there anything you can do with awk or sed that isn't built in to perl? I know I never used awk after I learned the latter, and sed very, very rarely.
- thewhitetulip 7y agoI tried to learn perl but I gave up halfway.
- j88439h84 7y agoI totally agree about the unnecessary verbosity. For a more concise Python on the command line, I like Mario: https://github.com/python-mario/mario https://github.com/python-mario/mario
- cf 7y agoThe original awk book from the creators is in my opinion really good. https://archive.org/download/pdfy-MgN0H1joIoDVoIC7/The_AWK_Programming_Language.pdf https://archive.org/download/pdfy-MgN0H1joIoDVoIC7/The_AWK_P...
- thewhitetulip 7y agoI found it to be a good introduction, but the issue is, it does not go in dept and teach by example.