4 ms·
You 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 t
by sam_lowry_ 5y ago
You 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.