Python Oneliner Program
Jump to navigation
Jump to search
A Python Oneliner Program is a Oneliner Program that is a Python Program.
- See: Perl Oneliner Program.
References
2012
- http://wiki.python.org/moin/Powerful%20Python%20One-Liners
- Reimplement cut: Print every line from an input file but remove the first two fields.
python -c "import sys;[sys.stdout.write(' '.join(line.split(' ')[2:])) for line in sys.stdin]" < input.txt
- Reimplement cut: Print every line from an input file but remove the first two fields.