Last active
August 29, 2015 14:26
-
-
Save h2onda/552399b6ac8db19c9edb to your computer and use it in GitHub Desktop.
separate crash log
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
#!/usr/bin/env ruby | |
ARGF.read.split(/crash>/).each_with_index{|str,idx| | |
open("%02g%s.log" % [idx, str.lines[0].gsub(" ","_").chomp], "w"){|file| | |
file << "crash>" << str | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment