Skip to content

Instantly share code, notes, and snippets.

@jayjanssen
Created November 20, 2012 14:47
Show Gist options
  • Select an option

  • Save jayjanssen/4118362 to your computer and use it in GitHub Desktop.

Select an option

Save jayjanssen/4118362 to your computer and use it in GitHub Desktop.
split mydumper output file into chunks
awk -v lines=1000000 -v fmt="database.table.%06d.sql" '{print>sprintf(fmt,1+int((NR-1)/lines))}' ../export-20121119-062335/database.table.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment