command-line one-liners a la Perl?
python at mrabarnett.plus.com
Thu Jun 18 16:05:12 CEST 2009
> I'm a recovering Perl addict, and I'm jonesin' badly for command-line
> one-liners, like
> % perl -lne '@f=split "\t";print join "\t", at f[3,1] if $f=~/frobozz/i' in.txt
> How can I get my fix with Python?
python -c "print 'Hello world!'"
Although you need to remember that Python makes much more use of
whitespace, which limits the usefulness of the command line.
More information about the Python-list