4 ms·
How long does the relearning take exactly? My experience has been that if you've used these tools before, it's pretty easy to remember or refresh your memory. I
by Debug_Overload 5y ago
How long does the relearning take exactly? My experience has been that if you've used these tools before, it's pretty easy to remember or refresh your memory. In that sense, they're not very different from other tools/syntaxes that you haven't used in a while.
And if you do use them frequently enough, you might not even need to refresh/relearn anything.
- baby 5y agoI basically gave up on relearning them considering the number of times I’ve had to do it and the amount of effort involved to relearn them. Maybe it’s just me, but I just write python now.
- sam_lowry_ 5y agoYou need to have a mental model for each tool and some idea of syntax associated with it. Once I learned about IFS,OFS, BEGIN, END and {}, as well as the fact that variables and their references have the same syntax, unlike in Perl... I could pick up coding in awk at any moment
- chasil 5y agoIFS is the POSIX shell; in awk, it's just FS. I think by {} you mean an argument to the find command.
- sam_lowry_ 5y agoIndeed. Thanks for the hint.
- kbenson 5y agoPerl has BEGIN and END as well, and when using it with -n or -p for line processing mode uses -F to set word boundaries just like awk. In fact, it shared many flags and features with awk, which it was meant to be able to be used as a more powerful version of the same tool.
- ivanhoe 5y agoMakes sense if python is what you otherwise use for everyday work, it's always easiest if you can avoid context switching. To me it's bash, sed and awk for the basic text-processing things, and then perl for anything that requires more programming. These are very similar syntaxes (and ways of thinking I'd say), so they fit together great - and also are close enough to php and js that I do at work to make the transition painless. But if I had to write it in python or ruby or God forbid C++ - which all I used a lot, but long time ago - I'm sure it would be a big struggle for me now.
- chasil 5y agoThe full specification for the AWK language is 40 pages in the book written by the authors. I sometimes forget the exact syntax for pipes and file open/close, but it's not hard to find in 40 pages. AWK is in busybox, and a lot of other places that Python simply cannot go. The control structure syntax is also the same a C/JavaScript/PHP/C++ etc., so it certainly does not hurt to know it. https://archive.org/download/pdfy-MgN0H1joIoDVoIC7/The_AWK_Programming_Language.pdf https://archive.org/download/pdfy-MgN0H1joIoDVoIC7/The_AWK_P...