Science Notes
A weblog sharing great ideas, theory, and implementations in data, sciences, and beyond.
Thursday, July 3, 2014
Print specific column of a text file
To print the second last column of a tab delimited file,
awk -F '\t' '{print $(NF-1)}' file
NF is a special awk variable that contains the number of fields in the current record.
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment