{"id":77,"date":"2010-03-29T13:09:58","date_gmt":"2010-03-29T20:09:58","guid":{"rendered":"http:\/\/patternweaver.com\/blog\/?p=77"},"modified":"2010-08-04T19:49:26","modified_gmt":"2010-08-04T19:49:26","slug":"77tail_requests_from_shell_i","status":"publish","type":"post","link":"http:\/\/patternweaver.com\/blog\/2010\/03\/77tail_requests_from_shell_i\/","title":{"rendered":"Tail Requests From Shell IP"},"content":{"rendered":"<p>Often when using a dev machine, your checking some shared logs for output about your specific process, turning a singlethreaded process into a mutithreaded output buffer. Not something that increases my sanity level. Instead of deal with that, I just wanted to filter out any traffic that isn&#8217;t from whatever IP is bound to the shell connection. After a little bit of RegEx and pipe magic I got it:<\/p>\n<p><code>tail -f [log_file_here] | grep $( finger `whoami`| sed -n 's\/.* from \\([0-9]\\{1,3\\}\\.[0-9]\\{1,3\\}\\.[0-9]\\{1,3\\}\\.[0-9]\\{1,3\\}\\).*\/\\1\/p')<\/code><\/p>\n<p>Nothing groundbreaking, but it saves me work.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Often when using a dev machine, your checking some shared logs for output about your specific process, turning a singlethreaded process into a mutithreaded output buffer. Not something that increases my sanity level. Instead of deal with that, I just wanted to filter out any traffic that isn&#8217;t from whatever IP is bound to the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-77","post","type-post","status-publish","format-standard","hentry","category-shell-scripting"],"_links":{"self":[{"href":"http:\/\/patternweaver.com\/blog\/wp-json\/wp\/v2\/posts\/77","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/patternweaver.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/patternweaver.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/patternweaver.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/patternweaver.com\/blog\/wp-json\/wp\/v2\/comments?post=77"}],"version-history":[{"count":0,"href":"http:\/\/patternweaver.com\/blog\/wp-json\/wp\/v2\/posts\/77\/revisions"}],"wp:attachment":[{"href":"http:\/\/patternweaver.com\/blog\/wp-json\/wp\/v2\/media?parent=77"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/patternweaver.com\/blog\/wp-json\/wp\/v2\/categories?post=77"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/patternweaver.com\/blog\/wp-json\/wp\/v2\/tags?post=77"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}