Skip to content

Instantly share code, notes, and snippets.

@aarsky
Created February 3, 2015 07:37
Show Gist options
  • Select an option

  • Save aarsky/a4c6785f89c175bbd435 to your computer and use it in GitHub Desktop.

Select an option

Save aarsky/a4c6785f89c175bbd435 to your computer and use it in GitHub Desktop.
Print every N-th line of text file
awk '{if (++count%N==0) print $0;}' < file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment