% GET-IP(1) Version 3.1.2 | Scripts Documentation % Georg Voell - georg.voell@standby.cloud % (c)2023 Standby.cloud NAME ==== **get-ip** - (BASH Script) Get the external ip of the instance and some more infos. SYNOPSIS ======== | **get-ip** \[_options_] \[_key_] DESCRIPTION =========== Get the external ip of the instance and some more infos. If there is no internet connection, the result would be empty. Options ------- -h, \--help          : Displays helptext. -v, \--version          : Displays the version of the script. -o, \--output _string_         : Output format: _string_ can be "plain", "keys" or "json". Key ------- This script can be called with an optional parameter "key" (otherwise it prints out all keys) e.g: ip          : Displays the IP e.g. "87.162.84.113". country         : Displays the Country e.g. "Germany". city          : Displays the City e.g. "Berlin". asn          : Displays the ASN ID e.g. "AS3320" for "Deutsche Telekom AG" or "AS31898" for "ORACLE-BMC / OCI" EXAMPLES ======== **get-ip** ip : Displays the External IP of the instance (returns empty string if there is no internet connection). **get-ip** \--output json : Displays all results in json format. **get-ip** \--output keys : Displays all results in key-pair-value format. EXIT CODES ========== 01: Unknown or wrong parameter. 02: **curl** not found. This script needs **curl** to perform. 03: No **jq** or wrong version of **jq**. This script needs **jq** to format "json". 04: No internet access. This script calls an external tool to get ip infos. 99: User interrupt. SEE ALSO ======== **check-port**(1), **get-platform**(1), **install-scripts**(1)