netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* A robust correct way to display local ip addresses of the device Gautieji x
@ 2020-03-30 16:49 Vaidas BoQsc
  2020-03-31 13:08 ` Matthias May
  0 siblings, 1 reply; 2+ messages in thread
From: Vaidas BoQsc @ 2020-03-30 16:49 UTC (permalink / raw)
  To: netdev

Are there any ways to output only the local ipv4 (inet) addresses of
the device using ip command?

I tired this way and both UNKNOWN, Down are not filtered away. Is my
usage of syntax incorrect?

 ip --brief address show up
lo               UNKNOWN        127.0.0.1/8 ::1/128
enp7s0           DOWN
wlp8s0           UP             192.168.0.103/24 fe80::22c:79e4:a646:a7b/64

  Even so, if enp7s0 and lo were filtered, I would still want an
output of simply 192.168.0.103 from ip command which can't be provided
without piping into other tools?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-31 13:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-30 16:49 A robust correct way to display local ip addresses of the device Gautieji x Vaidas BoQsc
2020-03-31 13:08 ` Matthias May

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).