Created
July 27, 2012 04:46
-
-
Save koko1000ban/3186222 to your computer and use it in GitHub Desktop.
log解析 rubyさん
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
ruby -e "puts STDIN.map{|line| line.split(/ /)}.select{|log| log[-1].to_f > 5.0 }.map{|log| log.join(' ')}" < access.log | |
#色付き | |
ruby -e "puts STDIN.map{|line| line.chomp.split(/ /)}.select{|log| log[-1].to_f > 5.0 }.map{|log| log[-1]=\"\e[31m\"+log[-1]+\"\e[0m\"; log.join(' ')}" < access.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment