Last active
December 16, 2015 23:59
-
-
Save debuggingfuture/5517133 to your computer and use it in GitHub Desktop.
awk
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
//print only first column from space separated file using awk | |
cat input.ssv | awk '{print $1}' |
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
//print only first column from comma separated file using awk | |
cat input.csv | awk 'BEGIN {FS=","}{print $1}' |
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
a | b | c | |
---|---|---|---|
d | e | f | |
h | i | j |
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
a b c | |
d e f | |
h i j |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment