Created
September 14, 2009 17:00
-
-
Save bycoffe/186772 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Like cut, but for CSVs. To be used from a shell command line. | |
Change row[1] to the row index to be printed. row[1] will print the second | |
item in the row. | |
""" | |
python -c 'import sys, csv | |
for row in csv.reader(sys.stdin): | |
print row[1]' < filename.csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment