{"author_url":"https://blog.hatena.ne.jp/grgrjnjn/","blog_url":"https://grgrjnjn.hatenadiary.org/","published":"2011-11-15 16:16:03","provider_name":"Hatena Blog","version":"1.0","author_name":"grgrjnjn","categories":["Linux","Ruby","\u30a2\u30a4\u30c7\u30a2"],"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgrgrjnjn.hatenadiary.org%2Fentry%2F20111115%2F1321341363\" title=\"color tee \u30b3\u30de\u30f3\u30c9 &quot;cotee&quot; \u7d20\u6848 - \u30ae\u30ea\u30ae\u30ea\u30ae\u30ea\u30ae\u30ea\u30b8\u30f3\u30b8\u30f3 \u30ae\u30ea\u30ae\u30ea\u30ae\u30ea\u30b8\u30f3\u30b8\u30f3\u30b8\u30f3\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_url":"https://hatena.blog","title":"color tee \u30b3\u30de\u30f3\u30c9 \"cotee\" \u7d20\u6848","image_url":null,"width":"100%","description":"tail -f \u3067\u3001\u30ed\u30b0\u3092\u773a\u3081\u3066\u3044\u308b\u3068\u304d\u306b\u3001\u30ad\u30fc\u30ef\u30fc\u30c9\u3092\u898b\u843d\u3068\u3055\u306a\u3044\u3088\u3046\u306b\u8272\u3092\u4ed8\u3051\u305f\u3044\u3002\u5b9f\u884c\u4f8b\u3002 $ cat cotee | ./cotee #!/usr/bin/ruby # # cotee - color tee command. read from stdin and write to stdout with color and files # # filename = ARGV.shift begin file = open(\"#{filename}\", \"w\") if filename ARGF.each_line do |line| print line.gsub(/ERROR/,\u2026","type":"rich","blog_title":"\u30ae\u30ea\u30ae\u30ea\u30ae\u30ea\u30ae\u30ea\u30b8\u30f3\u30b8\u30f3 \u30ae\u30ea\u30ae\u30ea\u30ae\u30ea\u30b8\u30f3\u30b8\u30f3\u30b8\u30f3","url":"https://grgrjnjn.hatenadiary.org/entry/20111115/1321341363","height":"190"}