Re: [dev] ipaddr - script friendly ifconfig/ip replacement
On Sun, 26 Mar 2023 10:54:19 -0700
Jeremy <jer_AT_jer.cx> wrote:
> One alternative is to just get the address from ifaddrs->ifa_addr.
That is what I did.
# /tmp/ipaddr
192.168.1.115 (genet0)
192.168.2.2 (genet0)
However, I am not sure what to do if you ask for the ip of the
interface:
# /tmp/ipaddr genet0
192.168.1.115
Might need a mask arg so you can get the ip you want. Printing all of
them isn't script friendly, but might be the correct thing to do?
Cheers,
Sean
Received on Sun Mar 26 2023 - 21:23:46 CEST
This archive was generated by hypermail 2.3.0
: Sun Mar 26 2023 - 21:36:08 CEST