You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Erik Hollensbe 1b6e867c32 Licensed 6 years ago
LICENSE.txt Licensed 6 years ago
README.md Added README 6 years ago
tfip.c Removed needless ifdef 6 years ago

README.md

The Friendly IP Tool

This tool simply gives you output of the ip addresses on your systems, and what interfaces they're attached to. It yields this in a format compatible with tools like 'awk' or other useful text processors for easy use in scripts.

Installing

git clone git://github.com/erikh/tfip
cd tfip
make tfip

Usage

Just running tfip is the simplest introduction. Just running that will give you a list of all the IPv4 and IPv6 addresses and the interfaces they are attached to on a machine.

There are two arguments:

  • tfip 4 will only display IPv4 addresses
  • tfip 6 will only display IPv6 addresses

Example

$ tfip
lo: 127.0.0.1
enp3s0: 10.0.1.6
docker0: 172.17.42.1
lo: ::1
enp3s0: fe80::ae22:bff:fe2b:6b71%enp3s0
enp3s0: fe80::eaec:25ce:1f4:5ac5%enp3s0
docker0: fe80::5484:7aff:fefe:9799%docker0
docker0: fe80::5ed2:fa94:613f:6138%docker0
$ tfip 4
lo: 127.0.0.1
enp3s0: 10.0.1.6
docker0: 172.17.42.1
$ tfip 6
lo: ::1
enp3s0: fe80::ae22:bff:fe2b:6b71%enp3s0
enp3s0: fe80::eaec:25ce:1f4:5ac5%enp3s0
docker0: fe80::5484:7aff:fefe:9799%docker0
docker0: fe80::5ed2:fa94:613f:6138%docker0

Author

Erik Hollensbe github@hollensbe.org

LICENSE

Public Domain, free to use for any reason.