Created
May 7, 2014 04:45
-
-
Save xecutioner/6ceff4ee31f1e41ae825 to your computer and use it in GitHub Desktop.
answer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
awk 'BEGIN { system("mkdir -p splitted/sub"++j) } | |
/<doc/{x="F"++i".xml";}{ | |
if (i%5==0 ){ | |
++i; | |
close("splitted/sub"j"/"x); | |
system("mkdir -p splitted/sub"++j"/"); | |
} | |
else{ | |
print > ("splitted/sub"j"/"x); | |
} | |
}' wiki_parsed.xml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment