Is there a reason, why not to make python useful for practical one liners
to replace perl and awk?
There is page Powerful Python One-Liners,
But almost none of them handles files, behaves like unix filter
or is ugly – must import modules, etc.
It seems that the command line options like -a, -n, -p, -F are still free. :-)
Why not use them almost the same way as in Perl?
E.g. -n would be almost equivalent to
from fileinput import *
for line in input():
<-c code comes here>
-p will print(line) as last command of the for cycle.
Why to learn Perl/awk/datamash/mlr/…, for “one line like” tasks?
Thank you in advance
Why not to have an elegant (one line) answer in python for questions like this?
Python-ideas mailing list -- email@example.com
To unsubscribe send an email to firstname.lastname@example.org
Message archived at https://email@example.com/message/IT5MXIZB3LSMZTHJHVFCFADSGZOW4S2Y/
Code of Conduct: http://python.org/psf/codeofconduct/