{"id":358,"date":"2012-06-02T01:51:34","date_gmt":"2012-06-01T22:51:34","guid":{"rendered":"http:\/\/www.held.org.il\/blog\/?p=358"},"modified":"2012-06-02T19:28:48","modified_gmt":"2012-06-02T16:28:48","slug":"introducing-myip","status":"publish","type":"post","link":"http:\/\/www.held.org.il\/blog\/2012\/06\/introducing-myip\/","title":{"rendered":"Introducing myip (no more ifconfig eye-grep!)"},"content":{"rendered":"<h2>Complex tools for a simple task<\/h2>\n<p>It's common for us, users and admins, to check what is the ip of the host we are logged in to. Currently on Linux, this task is commonly done by the <em>ip<\/em> and <em>ifconfig<\/em> tools. However, I find them way too complex for the simple task of checking what's the IP. their output is full of confusing, irrelevant details, and they have tons of command-line arguments.<\/p>\n<h2>But you can pipe it all through grep, sed and awk!<\/h2>\n<p>Well... I'm not even going to explain why it isn't friendly.<\/p>\n<h2>myip for the rescue<\/h2>\n<p>So after I failed to find a simple tool for displaying IPs, I started writing it myself. Some command line samples:<!--more--><\/p>\n<p>1. Show primary IP:<br \/>\n<code lang=\"bash\"># myip<br \/>\n192.168.1.100<\/code><br \/>\n2. Show all IPs:<br \/>\n<code lang=\"bash\"># myip --all<br \/>\n1.2.3.4<br \/>\n192.168.1.100<br \/>\n192.168.122.1<\/code><br \/>\n3. Show IP of a specific interface:<br \/>\n<code lang=\"bash\"># myip eth0<br \/>\n1.2.3.4<\/code><br \/>\nMore info &amp; download on the github page, <a href=\"https:\/\/github.com\/orenhe\/myip\">Check it out<\/a> and submit pull requests \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Complex tools for a simple task It&#8217;s common for us, users and admins, to check what is the ip of the host we are logged in to. Currently on Linux, this task is commonly done by the ip and ifconfig tools. However, I find them way too complex for the simple task of checking what&#8217;s [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[198,185,186,203],"_links":{"self":[{"href":"http:\/\/www.held.org.il\/blog\/wp-json\/wp\/v2\/posts\/358"}],"collection":[{"href":"http:\/\/www.held.org.il\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.held.org.il\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.held.org.il\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.held.org.il\/blog\/wp-json\/wp\/v2\/comments?post=358"}],"version-history":[{"count":0,"href":"http:\/\/www.held.org.il\/blog\/wp-json\/wp\/v2\/posts\/358\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.held.org.il\/blog\/wp-json\/wp\/v2\/media?parent=358"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.held.org.il\/blog\/wp-json\/wp\/v2\/categories?post=358"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.held.org.il\/blog\/wp-json\/wp\/v2\/tags?post=358"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}