News for hackers. Stuff that matters.
Re:Ask HN: Best Command-Line Applications? by Aweorih on Monday November 19, 2018 @12:59PM (#18488263)
> such as getting an external IP address of a host from the command-line.

What about using `ping host`? This also prints the ip

Re:Ask HN: Best Command-Line Applications? by mdip on Thursday November 29, 2018 @10:02PM (#18566282)
Ah, sorry, I wasn't clear in my statement:

A function that it provides is to display the public IP address from a host behind the NAT.

Another way to do this: `dig @resolver1.opendns.com ANY myip.opendns.com +short`[0] ... it's just trickier to remember. And since dig is a tool for performing DNS lookups, `man dig` doesn't hint at this particular trick.

In fact, I didn't actually remember the command that displays that for `climate`[1], because if I had, I would have written it as `public-ip`, which `climate help` informed me of. :)

[0] ... or if you prefer a more interactive and profane experience, try `lynx wtfismyip.com`

[1] My public IP is displayed on terminal start since I need it with some frequency; Of course, it's displayed as "External IP:", which is something I'll have to remedy.

Re:Ask HN: Best Command-Line Applications? by sfdgsdfg on Tuesday November 20, 2018 @03:05AM (#18492465)
or "dig host" for a proper dns lookup