Skip to content

Instantly share code, notes, and snippets.

@nosoop
Last active October 28, 2016 02:55
Show Gist options
  • Save nosoop/18586909a1c53b6a00e73d3829140859 to your computer and use it in GitHub Desktop.
Save nosoop/18586909a1c53b6a00e73d3829140859 to your computer and use it in GitHub Desktop.
awk script to dump datamaps by entity name to individual files
BEGIN {
output_filename="";
}
match($0, /^[A-Za-z0-9_]+ - [A-Za-z0-9_]+$/) {
output_filename= ($0 ".txt");
print ("Starting dump of " $0);
}
{
if (output_filename != "") {
print $0 > output_filename;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment