Last active
June 2, 2017 20:43
-
-
Save cdolek/5670945111115fedb7ae420b4dcd8757 to your computer and use it in GitHub Desktop.
Shell - get nth column of a csv file
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
# Get 2nd column of a csv file | |
awk -F "\"*,\"*" '{print $2}' sourceFile.csv > targetFile.csv | |
# Or | |
awk -F "," '{print $1}' someOtherSourceFile.csv > new.csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment