Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #256279

Re: what's the right way to resolve localhost's IPs

From Greg Wooledge <greg@wooledge.org>
Newsgroups linux.debian.user
Subject Re: what's the right way to resolve localhost's IPs
Date 2023-03-22 22:50 +0100
Message-ID <Gcevg-env1-5@gated-at.bofh.it> (permalink)
References <GbViV-ebLW-5@gated-at.bofh.it> <GbW5j-ech4-1@gated-at.bofh.it> <Gce2d-enkx-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Mar 22, 2023 at 09:16:48PM +0000, Tom Furie wrote:
> Or...
> 
> ip -o a | awk '{print $2, $4}'

I think they wanted to restrict it to IPv4 (inet) addresses, and omit
the netmask (/8 or whatever CIDR suffix), so:

ip -o a | awk -F '[ /]*' '$3 == "inet" {print $2, $4}'

But... again... why the hell would someone WANT THIS OUTPUT?  What is
it going to be use-- wait.  I remember now.  One of the posters in
this thread, I think not the OP, had the word "docker" in their
results.  So, there's no point asking any further.  Docker questions
that involve shell programming are never to be entertained.  It leads
only to increased misery, and never increased understanding.

Back to linux.debian.user | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

what's the right way to resolve localhost's IPs fh@dnsbed.com - 2023-03-22 02:20 +0100
  Re: what's the right way to resolve localhost's IPs Jeremy Ardley <jeremy@ardley.org> - 2023-03-22 03:10 +0100
    Re: what's the right way to resolve localhost's IPs fh@dnsbed.com - 2023-03-22 03:40 +0100
    Re: what's the right way to resolve localhost's IPs Gregory Seidman <gsslist+debian@anthropohedron.net> - 2023-03-22 21:40 +0100
    Re: what's the right way to resolve localhost's IPs Tom Furie <tom@furie.org.uk> - 2023-03-22 22:20 +0100
      Re: what's the right way to resolve localhost's IPs Greg Wooledge <greg@wooledge.org> - 2023-03-22 22:50 +0100
        Re: what's the right way to resolve localhost's IPs Jeremy Ardley <jeremy@ardley.org> - 2023-03-23 00:10 +0100
          Re: what's the right way to resolve localhost's IPs Greg Wooledge <greg@wooledge.org> - 2023-03-23 00:40 +0100
            Re: what's the right way to resolve localhost's IPs Jeremy Ardley <jeremy@ardley.org> - 2023-03-23 01:00 +0100
              Re: what's the right way to resolve localhost's IPs Nicolas George <george@nsup.org> - 2023-03-23 08:50 +0100
                Re: what's the right way to resolve localhost's IPs Jeremy Ardley <jeremy@ardley.org> - 2023-03-23 09:00 +0100
                Re: what's the right way to resolve localhost's IPs Lee <ler762@gmail.com> - 2023-03-23 12:00 +0100
  Re: what's the right way to resolve localhost's IPs Emanuel Berg <incal@dataswamp.org> - 2023-03-30 07:50 +0200
    Re: what's the right way to resolve localhost's IPs fh@dnsbed.com - 2023-03-30 10:10 +0200

csiph-web