3 ms·
My favorite thing has been `| ruby -e "puts STDIN.to_a. ..."`, allows to run any kind of code on the standard input, much easier than remembering awk/sed variou
by aboutruby 8y ago
My favorite thing has been `| ruby -e "puts STDIN.to_a. ..."`, allows to run any kind of code on the standard input, much easier than remembering awk/sed various options and much more powerful.
edit: same thing can be done with Python/Perl
- apabepa 8y agoYes, easier if you know ruby.. sed/awk is good for munching strings in small scripts and it is also always installed on a unix system (AFAIK).
- dredmorbius 8y agoYou'll find sed and awk in busybox, virtually always, even on minimal systems. Including embedded devices, routers, Android, etc.