Last active
October 28, 2016 02:55
-
-
Save nosoop/18586909a1c53b6a00e73d3829140859 to your computer and use it in GitHub Desktop.
awk script to dump datamaps by entity name to individual files
This file contains 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
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