Skip to content

Instantly share code, notes, and snippets.

@vikjam
Created March 12, 2017 02:27
Show Gist options
  • Save vikjam/e893055d099e628004105b4745104685 to your computer and use it in GitHub Desktop.
Save vikjam/e893055d099e628004105b4745104685 to your computer and use it in GitHub Desktop.
Split file into equal parts
awk 'NR%20==1 { file = FILENAME "_" sprintf("%04d", NR+19) } { print > file }' domains.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment