Skip to content

Instantly share code, notes, and snippets.

@mike-seger
Created December 15, 2024 19:43
Show Gist options
  • Save mike-seger/afcdb2f28cf71f83d15996c988119fb5 to your computer and use it in GitHub Desktop.
Save mike-seger/afcdb2f28cf71f83d15996c988119fb5 to your computer and use it in GitHub Desktop.
Merge odd and even lines into a tab delimited file
awk 'NR % 2 == 1' input.txt > odd_lines.txt
awk 'NR % 2 == 0' input.txt > even_lines.txt
paste -d '\t' odd_lines.txt even_lines.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment