Skip to content

Instantly share code, notes, and snippets.

@eegrok
Created August 21, 2012 22:22
Show Gist options
  • Save eegrok/3419977 to your computer and use it in GitHub Desktop.
Save eegrok/3419977 to your computer and use it in GitHub Desktop.
awk retrieve specific row / column
2nd row 4th column
cat blah | awk 'NR==2 {printf "%s", $4}'
NR -- ordinal number of the current record
NF -- number of fields in the current record
(see man for awk for other stuff)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment