Skip to content

Commit 240014c

Browse files
committed
Add info on gethostip's new api to docs
1 parent d4f33fa commit 240014c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ Some of those scripts were written for
1313
* [Make a sound once process is complete](https://askubuntu.com/questions/277215/make-a-sound-once-process-is-complete/604116#604116) (on [Ask Ubuntu](https://askubuntu.com/users/11582/rsp))
1414
* [How can I get my external IP address in bash?](https://unix.stackexchange.com/questions/22615/how-can-i-get-my-external-ip-address-in-bash/194136#194136) (on [Unix & Linux](https://unix.stackexchange.com/users/23774/rsp))
1515
* [How do I find my internal ip address?](https://askubuntu.com/questions/430853/how-do-i-find-my-internal-ip-address/604691#604691) (on [Ask Ubuntu](https://askubuntu.com/users/11582/rsp))
16-
1716
Some are just for my own conveniece. Maybe they would be useful to someone else.
1817

1918
Functions
@@ -50,7 +49,8 @@ Source: https://rawgit.com/rsp/scripts/master/internalip
5049

5150
Get internal IP address used for outgoing Internet connections.
5251

53-
TARGET is an IP address, `8.8.8.8` by default.
52+
TARGET is an IP address, `8.8.8.8` by default,
53+
or a host name (if `gethostip` or `getent` are available on the system).
5454

5555
See [internalip.md](internalip.md) for more info.
5656

internalip.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ that would be used to connect to a given target.
1212

1313
The TARGET is optional and by default it is `8.8.8.8`
1414
(which is the [Google's public DNS resolver](https://developers.google.com/speed/public-dns/docs/using)).
15+
It can be an IP address or a host name (if `gethostip` or `getent` are available on the system).
1516

1617
Note: this is not necessarily the same IP as the public IP that you visible under while connecting to the Internet
1718
(for that use [externalip](externalip.md)).

0 commit comments

Comments
 (0)