|
|
|
|
|
by fargle
709 days ago
|
|
AWK is better suited to command line ad-hoc and shell script use. it is simple, straight-forward, and surprisingly powerful. most of the time sh+awk can replace sh+sed+cut+grep constructs. GNU awk (gawk) flavor is ubiquitous and it has a great manual [1]. and you have the AWK book [2] (not "free", but easily found). perl is more of a completely replacement for sh+awk for a standalone script/program. it was the first scripting language i know of that could do sockets networking and other complex things you'd previously need to write in c. it has extremely powerful text processing capabilities, like awk. but it's a big complicated, unusual scripting language. if you want a big complex full-featured scripting language to make a complete tool these days, why not use Python? if you only need really fancy text manipulation, maybe Perl, but i don't see that use a lot. [1] https://www.gnu.org/software/gawk/manual/html_node/index.htm...
[2] https://awk.dev/ |
|
Ruby is heavily inspired by Perl and lets you do a lot of work with simple one liners embedded in Bash scripts.
It's also great for longer standalone programs and there is a larger community.
Lots of interesting Perl-isms are also doable in Ruby.