Skip to content

Instantly share code, notes, and snippets.

@mazuhl
Created December 22, 2010 16:09
Show Gist options
  • Save mazuhl/751694 to your computer and use it in GitHub Desktop.
Save mazuhl/751694 to your computer and use it in GitHub Desktop.
Every third line starting from the first, second and third (using sed)
sed -n '1~3p' file.txt
sed -n '2~3p' file.txt
sed -n '3~3p' file.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment