Created
November 10, 2015 03:28
-
-
Save martin2110/7561662c57a0d170a3d4 to your computer and use it in GitHub Desktop.
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/ruby | |
logfile='logfile.txt' | |
File.read(logfile).split("\n").each do |ln| | |
if ln =~ /(^\d\d\d\d-\d\d-\d\d)(.*)(\d\d\d\d-\d\d-\d\d)(.*)/ | |
puts $1 + $2 + $4 | |
else | |
puts ln | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment