Skip to content

Instantly share code, notes, and snippets.

@gwenshap
Created November 2, 2012 00:57
Show Gist options
  • Select an option

  • Save gwenshap/3997968 to your computer and use it in GitHub Desktop.

Select an option

Save gwenshap/3997968 to your computer and use it in GitHub Desktop.
Split a file using AWK
nohup awk 'BEGIN{RS="\t\t\n"; FS="\t";}NR%300000==1{x="cc_unl_"++i;}{print > x}' ../catalog_caption.unl &
@gwenshap

gwenshap commented Nov 6, 2012

Copy link
Copy Markdown
Author

awk 'BEGIN{RS="\f\f\n"; FS="\t";ORS="\f\f\n"}NR%300000==1{x="cc_unl_"++i;}{print > x}'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment